Page 1 of 1
Y-Axis minimum

Posted:
23 Nov 2018 18:49
by XenoG
I've just upgraded CGDevTools from 3.5 to 4.1 and I have a change in behaviour of the first tick on my y-axis. In my code I create a y-axis of type jqplrCanvasAxisLabelRenderer and I set the minimum to be zero (yAxis->Options->Min = 0;). This used (CG ver 3.5) to ensure that the y-axis started at 0, but now the y-axis starts with a negative number (.e.g. -200) and the second tick is 0. All of the points on the graph have a y-value that is 0 or greater. Any ideas how I can ensure the y-axis starts at 0.
Thanks,
Richard
Re: Y-Axis minimum

Posted:
29 Nov 2018 10:06
by Alexander Bulei
Hi XenoG,
Please send me the simple testcase project.
TIA
Best Regards.
Re: Y-Axis minimum

Posted:
30 Nov 2018 13:39
by XenoG
Hi Alexander,
I've found the cause of the problem. If TIWCGJQPlot's property JQReDrawAfterResize is True, the axis minimum value is ignored. I've attached an C++ Builder project that illustrates the problem. If you prefer to recreate in Delphi, just add a TIWCGJQPlot to a form and set the default axes min to 0 and then set JQReDrawAfterResize to true. Add some data points and when you view the chart, the min value of 0 is ignored. Setting JQReDrawAfterResize to False will make the program respect the min value of 0.
Regards,
Richard
Re: Y-Axis minimum

Posted:
04 Dec 2018 18:38
by Alexander Bulei
Hi XenoG,
You're right, it's a jquery plugin issue with replot function.
It's fixed on next beta build:
- Code: Select all
JQPlot
- Fixed: function replot in jquery plugin. Function is called when JQReDrawAfterResize is TRUE.
- Fixed: js error in desing-time when JQReDrawAfterResize is TRUE
Thank you.
Best Regards.
Re: Y-Axis minimum

Posted:
05 Dec 2018 12:58
by XenoG
Thanks Alexander. I'll grab the next beta and test that it is fixed.
Merry Christmas to you all in Portugal.
Richard