jQWidgets Forums

jQuery UI Widgets Forums Chart Interval problems

This topic contains 11 replies, has 3 voices, and was last updated by  Peter Stoev 10 years, 4 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • Interval problems #65530

    carlo
    Participant

    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
    Carlo

    Interval problems #65541

    yoda
    Participant

    Hi 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!

    Interval problems #65549

    carlo
    Participant

    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,
    Carlo

    Interval problems #65551

    Peter Stoev
    Keymaster

    Hello 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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Interval problems #65554

    carlo
    Participant

    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,
    Carlo

    Interval problems #65556

    Peter Stoev
    Keymaster

    Hi 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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Interval problems #65603

    carlo
    Participant

    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,
    Carlo

    Interval problems #65606

    Peter Stoev
    Keymaster

    Hi Carlo,

    The function is called as many times as it is necessary. There are no redundant things in our Chart.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Interval problems #65609

    carlo
    Participant

    Hi Peter,

    but why are you calling the formatFunction for the same time value more than once ?

    Best Regards,
    Carlo

    Interval problems #65610

    Peter Stoev
    Keymaster

    Hi Carlo,

    First call measures, the second renders using the measured bounds.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Interval problems #65616

    carlo
    Participant

    Hi Peter,

    thanks for your explanation. But why again for every additional serious group, as there is only one xAxis ?

    Best Regards,
    Carlo

    Interval problems #65619

    Peter Stoev
    Keymaster

    Hi Carlo,

    If you are so interested in the Chart’s calculations and internal logic, please take a look at its sources.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.