Home Forums Chart Support IntervalType is not working for Time XAxis

IntervalType is not working for Time XAxis

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

    I have been trying to set the interval and interval type of the Chart X Axis in my React app and it is throwing a run-time error.
    I am trying to set the interval type to “day” or “month”.
    But it crashes!

    I tried the same with the JSFiddle example given in the documentation and that has the same issue. It is failing with an error “Uncaught ReferenceError: CanvasJS is not defined”
    https://canvasjs.com/docs/charts/chart-options/axisx/intervaltype/

    #61061

    @pf-canvasjs,

    I have been trying to set the interval and interval type of the Chart X Axis in my React app and it is throwing a run-time error.
    I am trying to set the interval type to “day” or “month”.
    But it crashes!

    Browser can crash if the overall interval is too small because of interval & intervalType combination. You can avoid this by setting interval & intervalType, according to axis range, such that there are minimal labels to be rendered on the axis. If you are still facing the issue, kindly share the JSFiddle or CodePen reproducing the issue so that we can look into the options being passed, understand your scenario better and help you out.

    I tried the same with the JSFiddle example given in the documentation and that has the same issue. It is failing with an error “Uncaught ReferenceError: CanvasJS is not defined”

    There seems to be some issue in JSFiddle because of which the script mentioned in the resource section doesn’t get loaded. To overcome this, you can place the code to include https://cdn.canvasjs.com/canvasjs.min.js script inside the html content and should work fine in your case.

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.