jQuery UI Widgets Forums Chart determine axis values of dynamic chart

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 7 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • determine axis values of dynamic chart #60870

    Florian Auer
    Participant

    Hi

    I know that the min and max values for a charts valueAxis and categoryAxis (xAxis) can be defined in the settings.
    These informations can later be claimed by code like:

    
    var xAxis = $('#chart').jqxChart('categoryAxis');
    var yAxis = $('#chart').jqxChart('seriesGroups')[0].valueAxis;
    xMin = xAxis.minValue;
    xMax = xAxis.maxValue;
    yMin = yAxis.minValue;
    yMax =  yAxis.maxValue;
    

    If one ore all of these properties have not been defined within the settings than the chart is genereating dynamic axis ranges, what is good from my point of view.
    But how do I than get the values for these ranges out of the chart?
    The way above only returns ‘undefined’.

    Did I miss something or do i have always to nail down the min and max values for the axis if i want to digg them later on out of the chart?

    determine axis values of dynamic chart #60934

    Dimitar
    Participant

    Hello DesMas,

    If these properties are not set, then you would get undefined when you try getting them. Unfortunately, there is no direct way to get the actual min or max values if they are not defined. You could possibly achieve this if you iterate through your data and determine the min and max values. You should also take in mind the unitInterval setting (if the actual max value is 1350 and the unitInterval is 500, then the real axis max value would be 1500).

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.