Home Forums Chart Support Memory issues with small interval & big value

Memory issues with small interval & big value

Viewing 2 posts - 1 through 2 (of 2 total)
  • #21098

    There is an issue if we set axis interval to a small value, and will have a much bigger actual value,
    Browser page is stuck or produce ugly graph result after long delay like this:

    for example, interval 1 and value 5 000 000:

    axisY:{
    title: “Metrics Values”,
    titleFontFamily: “verdana”,
    titleFontSize: 24,
    titleFontColor: “DarkCyan”,
    labelFontSize: 18,
    interval: 1
    },

    data: [
    {
    type: “column”,
    dataPoints: [
    { x: 1, y: 1 },
    { x: 2, y: 1.2 },
    { x: 3, y: 7.476 },
    { x: 4, y: 8.583 },
    ]
    },

    {
    type: “column”,
    dataPoints: [
    { x: 1, y: 24.951 },
    { x: 2, y: 124.039 },
    { x: 3, y: 5000000 },
    { x: 4, y: 6.918 },
    ]
    }
    ]

    Full sample is here: http://jsfiddle.net/flashback_ua/QwZuf/1327/

    I suppose it should be considered as a bug. As solution, it could be for example – in case if max value more than 1000 times of interval, then interval should be switched to auto.

    • This topic was modified 6 years, 5 months ago by vladimirs.
    #21121

    @vladimirs,

    To avoid overlapping of labels, interval is automatically calculated. When interval is set to 1, labels get rendered for every value within the axis range. In your case, labels get rendered for every value starting from 1 to 5000000 since the interval is set to 1, resulting in label overlapping and delay in rendering. However, interval for axes has to be set according to the range of input that’s been provided to the chart. Please refer to interval in our documentation.

    If max value more than 1000 times of interval, then interval should be switched to auto.

    Thanks for the suggestion. CanvasJS doesn’t ignore user provide inputs, except for the rare scenarios. However, if the interval is not set, it gets auto-calculated.

    __
    Priyanka M S
    Team CanvasJS

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

You must be logged in to reply to this topic.