-
2 Jan 2013 5:38 AM #1
Unanswered: Gauge chart with needle
Unanswered: Gauge chart with needle
Hi,
I am trying to create Gauge chart with needle.
I have used config parameter "needle:true",
However I can see the needle but the chart is in one color only (only 1 slice is added).
Gauge with needle.jpg
Is it by design or some bug in it.
Attached image is 2 gauge chart with and without needle.
Thanks in advance
-
4 Jan 2013 5:25 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
- Answers
- 3111
Can I get a test case for this? Development has ceased on Touch Chart beta so bugs will not be fixed. We are only developing ST2 charts in ST 2.1.0+
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
4 Jan 2013 8:01 AM #3
Code to reproduce
Code to reproduce
I hope it will help.Code:var GaugeChartPnl = Ext.create('Ext.Panel', { id: 'GaugeChartPnl', flex:1, layout: { type: 'vbox', align: 'stretch' }, defaults: { insetPadding: 25 }, items: [ { xtype: 'chart', id: 'gaugeChart', flex: 1, animate: { easing: 'bounceOut', duration: 500 }, store: store_gauge, axes: [ { type: 'gauge', position: 'gauge', minimum: 0, maximum: 100, steps: 10, margin: 7 } ], series: [ { type: 'gauge', field: 'sales_percentage', needle: 'true', donut: 50, colorSet: ['#55B42F', '#ddd'] } ] }, { xtype: 'titlebar', docked: 'bottom', title: 'KPI', } ] });
-
23 Apr 2013 9:57 PM #4
Hi,
I'm working on Ext JS version 4.1 and same thing is happening with me as well.
When I don't make use of needle attribute, I get 2 slices in a Gauge chart in 2 different colors but when I specify needle attribute, entire Gauge chart gets changed to only one color.
Please see attached image.
Any assistance here please.
Sample code is mentioned as below:Ext.require(['Ext.chart.*', 'Ext.chart.axis.Gauge', 'Ext.chart.series.*', 'Ext.Window','Ext.chart.Label','Ext.draw.Color','Ext.draw.*']);
var myStore = Ext.create('Ext.data.ArrayStore', {
fields: [
{name: 'chapters', type: 'int'}
],
data: [['20'],['34']]
});
Ext.onReady(function () {
Ext.create('Ext.Window', {
width: 500,
height: 500,
minWidth: 500,
minHeight: 500,
title: 'Gauge Charts',
layout: {
type: 'hbox',
align: 'stretch'
},
items: [{
xtype: 'chart',
style: 'background:blue',
store: myStore,
insetPadding: 25,
flex: 1,
axes: [{
type: 'gauge',
position: 'gauge',
minimum: 0,
maximum: 100,
steps: 10,
margin: -10
}],
series: [{
type: 'gauge',
field: 'chapters'
//donut: 30,
//needle: true,
//colorSet: ['yellow', '#ddd']
}],
series: [{
type: 'gauge',
field: 'chapters'
//donut: 30,
//needle: true,
//colorSet: ['green', '#ddd']
}]
}]
}).show();
});
Regards,
Rohit
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote