In the attached picture, when we zoom in graph the x-axis values converts from integer to double. I want the x-axis value to be in integer without rounding the value. When I move horizontally the value should be in integer.
I have tried the decimalPlace = 0, but that's misleading the plotted points.
Hi Syed Muzammil Ali,
Your requirement can be achieved with help of the number format property which is available in the axis. Please refer to the following code snippet.
NumericAxis( numberFormat: NumberFormat("#"), ) |
For more details, refer to the UG:
https://help.syncfusion.com/flutter/backup/chart/axis-types#formatting-the-labels
Regards,
Lavanya A.
After implementing this, it doesn't help in my case:
NumericAxis(
numberFormat: NumberFormat("#"),
)
My problem statement is, when I zoom in, the clicked plotted points should be between 4 to 5 in x-axis but it shows between 3 to 4.
Hi Syed Muzammil Ali,
Your requirement can be achieved with help of the number format property which is available in the axis. Please refer to the following code snippet.
NumericAxis( numberFormat: NumberFormat("#"), ) |
Hi Syed,
We are validating your query at our end and we will update further details tomorrow. We appreciate your patience until then.
Regards,
Yuvaraj.
Following up on the problem.
Hi Syed,
A TooltipBehavior will identify the nearest data point to the location that is tapped and display a tooltip for that data point. For example, if you tap between the values 4 and 5, but there is no data between 4 and 5, then the tooltip will be displayed at the nearest point between 3 and 4. This is the default behavior, and we have provided a sample for your reference.
If you are still facing any issues, we kindly request you to share more information on your requirement in detail along with screenshots and screen recordings, also try to reproduce the reported issue in the shared sample. So that it will help us assist you in a better way.
Regards,
Yuvaraj.
Hi Yuvaraj,
In the attached picture you can see x-axis values are shown in decimals, and
In img#1, we can see age: 9y 2m i.e, 9.2 plotted between 8.4 - 9.4 (x-axis) , which is technically accurate.
Now, in img#2, in code I added decimalPlace=0, we can see values are in integer, now see age: 9y 2m i.e, 9.2 plotted between 8 - 9 (x-axis), which is misleading, instead it should be between 9-10.
Can you pls suggest a solution for this problem?
Img#1,