Saad ERRADI
Saad ERRADI

Reputation: 11

GXT4 - Problem with the axis Y of the charts

I'm in the process of implementing GXT 4 to display Line Charts based on the example: https://examples.sencha.com/gxt/examples/#ExamplePlace:charts_linechart

I have a problem with the axis Y not showing me double values, see attached image.

For the example in image, I have a minimum of -0.75 and a max of 0.8. But the values displayed on the axis are "0" and "-0".

Can you help me solve this problem please. Regards.

enter image description here

Upvotes: 1

Views: 51

Answers (1)

Colin Alworth
Colin Alworth

Reputation: 18346

It looks like you might be using the default axis label provider, which is only displaying the integer value of the values.

Try creating a new label provider which uses your preferred level of precision and passing it to yAxis.setLabelProvider(...). Just sending the string value of the number can be problematic since double values might be more precise than you want (for example, 0.300000000001 instead of 0.3)

Upvotes: 2

Related Questions