View Full Version : Gauge Chart : truncate decimals on steps values

4 May 2012, 1:42 AM
Hello everybody,

I need to create a gauge chart with very low values, for example data between 0 and 2. In this case the steps values need to be floats, but figures shows up with decimal truncated.
This is a simple example

Ext.onReady( function () {
var store = Ext.create('Ext.data.Store', {
fields: ['value']
store.add({ 'value': 1.1 } );

Ext.create('Ext.container.Viewport', {
layout: 'fit',
items: [
xtype: 'chart',
style: 'background:#fff',
animate: true,
store: store,
insetPadding: 25,
flex: 1,
axes: [{
type: 'gauge',
position: 'gauge',
minimum: 0,
maximum: 2,
steps: 10,
margin: 7
series: [{
type: 'gauge',
field: 'value',
//donut: 30,
colorSet: ['#82B525', '#ddd']

renderTo: Ext.getBody()

Thanks in advance

7 May 2012, 8:09 AM
I need to know the answer to this as well...

9 Sep 2012, 6:30 PM
There is also a similar truncating problem when you set steps to be > the number of integers between the max and the minimum.


There will be duplicates in the tick marks unless you scale the number of steps down to 5.

I am currently using this as a solution for non-decimals but definitely would like to see support for decimals as well!

25 Feb 2013, 1:25 PM
I desperately need this as well

15 Apr 2014, 7:18 AM
I second this request. A perfect example is Actual (or Projected) Service Levels which are rarely whole integer values. There is certainly a need to be able to specify a Step Increment instead of the number of steps.