CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Y-Axis minimum

by XenoG » 23 Nov 2018 18:49

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
XenoG
 
Posts: 36
Joined: 15 Nov 2016 15:04

by Alexander Bulei » 29 Nov 2018 10:06

Hi XenoG,
Please send me the simple testcase project.

TIA
Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by XenoG » 30 Nov 2018 13:39

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
You do not have the required permissions to view the files attached to this post.
XenoG
 
Posts: 36
Joined: 15 Nov 2016 15:04

by Alexander Bulei » 04 Dec 2018 18:38

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by XenoG » 05 Dec 2018 12:58

Thanks Alexander. I'll grab the next beta and test that it is fixed.

Merry Christmas to you all in Portugal.

Richard
XenoG
 
Posts: 36
Joined: 15 Nov 2016 15:04


Return to JQPlot

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.