jQWidgets Forums
jQuery UI Widgets › Forums › Chart › Interval problems
Tagged: chart interval
This topic contains 11 replies, has 3 voices, and was last updated by Peter Stoev 10 years, 4 months ago.
-
AuthorInterval problems Posts
-
Hello,
I have problems displaying separate intervals for tick, grid and unit. The ticks should be every hour, the gridlines every two hours. I do see no tickmarks and gridlines are every four hours instead of every two hours: http://jsfiddle.net/carlorastelli/jmhwp13w/34
Best Regards
CarloHi Carlo,
I guess the issue here is that in your example the unitInterval is bigger. Ticks and grid lines align to unitInterval so that implies they need to be multiples of the unitInterval. You can get to what you’re trying to do very easily – just make the unitInterval the smallest and then you can skip some labels in the formatFunction if you want the labels like 0,4,8,…,n*4
Here’s as a fiddle:
http://jsfiddle.net/yodadev/w8vfxLvd/3/
Cheers!
Hi yoda,
thank you very much for your hint. This must be a new behaviour of the widget. In version 3.0.4 there was no such dependency. As this dependency is not documented in the API could someone from jqwidgets please clarify.
Best Reagads,
CarloHello Carlo,
jqxChart changed much since 3.0.4 which is from November 2013. If you’re upgrading to newer version, we would suggest you to look at the Release Notes and Updated Demos. Sometimes changes are required especially when the update is from such an old version.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hello Peter,
the behaviour changed from 3.2.2 to 3.3.0. The 3.3.0 release note says:
‘jqxChart Automated best fit selection of unit intervals. Unit interval axis settings are now optional’
I removed the unitInterval from http://jsfiddle.net/jmhwp13w/35/ . Now there are no tick marks at all and the untis are wrong (0,2,5 ??)
Could you please tell me, how we can get it right.Best Regards,
CarloHi Carlo,
May be we should have documented it better. The yoda’s sample is OK and you can use that approach if you wish.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
while testing I noticed, that the formatFuntion is not called only once for every unitIntervall, but (1 + number of serious groups) for every unitInterval. This seems to me beeing redundant.
You can see it here: http://jsfiddle.net/carlorastelli/jmhwp13w/51/
Best Regards,
CarloHi Carlo,
The function is called as many times as it is necessary. There are no redundant things in our Chart.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
but why are you calling the formatFunction for the same time value more than once ?
Best Regards,
CarloHi Carlo,
First call measures, the second renders using the measured bounds.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
thanks for your explanation. But why again for every additional serious group, as there is only one xAxis ?
Best Regards,
CarloHi Carlo,
If you are so interested in the Chart’s calculations and internal logic, please take a look at its sources.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.