Home › Forums › Chart Support › Handle invalid values

Handle invalid values

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

    R W

    Just testing out this library for an upcoming project. How does one handle an invalid value in this chart
    https://canvasjs.com/javascript-charts/dynamic-live-multi-series-chart/

    Say for example the values could range from 0-127 but values of interest are only between 0-99 (only this needs to be visualized). A value of 127 is considered erroneous.

    Thanks

    #36620

    @r-w,

    You can use viewportMinimum and viewportMaximum properties of axisY and set it to 0 and 99 respectively so that any value above 99 or below 0 are not visualized. Kindly take a look at this code-snippet for an example on your requirement,

    axisY: {
      viewportMinimum: 0,
      viewportMaximum: 99
    }

    You can take a look at this JSFiddle for an example with complete code on the same.

    If the solution suggested doesn’t fulfill your requirement, kindly brief us further about your use case with a pictorial representation or an example so that we can understand your scenario better and help you out with an appropriate solution.

    dynamic chart with viewportMinimum and viewportMaximum

    —
    Adithya Menon
    Team CanvasJS

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

You must be logged in to reply to this topic.