jQuery UI Widgets › Forums › Chart › Y Axis value repeated multiple times
Tagged: Angular chart, bootstrap chart, Decimal Places, javascript chart, jquery chart, jqwidgets chart, jqxChart, jqxchart Y axis repeating values
This topic contains 5 replies, has 4 voices, and was last updated by Christopher 7 years, 7 months ago.
-
Author
-
Hello sir
I am using jxqchart with
Y axis auto
decimal place 5
my y axis repeated multiple times. Please see link belowhttp://jsfiddle.net/UX2c6/694/
I dont want to min and max Y axis value and unit interval.
Hi Rasul Gani Sheikh,
The Y axis isn’t repeating. If you change the property “decimalPlaces” to 6 you will notice that the values are actually different.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comI want to keep decimal places 5 as it is. And also don’t want to show repeated value on y axis label axix. I tried by round up the value but problem remain same.
Rounding up the numbers won’t make any difference because the numbers themselves are different only after their 5th preciison point. Mathematically you can’t show different values when they are the same until their 6th precision number. The only solution to see the difference between the numbers is if you use a bigger precision ( decimal places > 5), or use different values that have bigger differences.
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.comIs there any option to hide repeated value. Only show the distinct values on y axis. We cant increase the decimal precision because this is endless. If in future value gets small in that case this idea again apply that increase decimal position which is only rework again and again.
Please reply.Hi kapiljain,
Yes there is a way to acomplish that. You can use the
formatFunction(value)
property of thevalueAxis
to check if the value is already drawn and return an empty string instead of the value. You can create a global variable of type array to cache the values that already have been drawn and check the new values agains it. Here’s an example of a format function:formatFunction: function (value) { if (values.indexOf(value) > -1) { return ''; } values.push(value); return value; }
Best Regards,
ChristopherjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.