jQWidgets Forums

jQuery UI Widgets Forums Chart JqxChart FormatFunction unexpected behavior

This topic contains 2 replies, has 2 voices, and was last updated by  xair0811 8 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • xair0811
    Participant

    I was trying to label my line graph using provided formatFunction.

    formatFunction : function(value, index, columnIndex) {
       console.log(index);
    }

    When I try this function with only thousands of data, it prints all the indexes just fine.
    However, when I try with more than ten thousand data, it starts to skip few indexes randomly.
    But I have figure out that if I have same y-values for two consecutive indexes, it’s skipping the second one.
    Our x-axis interval is not constant.

    I have examined this problem with two different series in a single chart.
    Let’s call a series with various y-axis values graph ‘A’, and one with equal y-axis values graph ‘B’ where two graphs have same x-axis values.
    So graph ‘A’ will have zigzag pattern while graph ‘B’ will be a horizontal line.
    I tried running the app couple times.
    Both graph ‘A’ and ‘B’ skip few indexes, and it seems to me that they are skipping the same indexes every time.
    However, the values they are skipping aren’t the same.
    ex. graph A always skip index 1, 3, 5
    and graph B always skip index 1, 3, 4

    Hope you get what I meant.

    Thank you.


    ivailo
    Participant

    Hi xair0811,

    Please, send a jsfiddle/jseditor demo with your code, for better analyze of the case.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    xair0811
    Participant

    Hi,
    We have generated a sample demo.
    One thing you have to modify is the size of data set.
    As you will see, we are generating data set with size 10, but please try it with 4000 data.
    When you modify the data size value, please change the generate function as well.
    Since we are labeling every 5 data, your browser could freeze, so try changing that value from ‘i%5’ to ‘i%100’.
    When you try with 4000 data size and ‘i%100’,
    horizontal graph on the top will show only few ‘A’ labels while graph on the bottom will clearly show more than that.
    We are expecting both graphs to show same amount of ‘A’ labels.
    jseditor

    Thank you again.

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

You must be logged in to reply to this topic.