Home forums Using CanvasJS Scatter Charts X values sorted default

This topic contains 1 reply, has 2 voices, and was last updated by  Shashi Ranjan 3 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26209

    Hello,
    We are using Scatter charts with dynamic datas, and we are deleting old datas. Our X values is not sorted, but we noticed that CanvasJs is sorting X values for Scatter Charts as default. When we delete the old datas from array, wrond datas are deleted because of CanvasJs sorted the X values.
    Is there any way to prevent sorting X values for Scatter Charts?

    Thanks.

    #26247

    @ahmetsarikaya,

    This behavior is by design and datapoints are sorted in case of scatter and bubble charts. In your case, you can have a key that stores the index of the datapoint being passed and use that key to delete the particular datapoint as shown in this JSFiddle.

    If you are still facing issue, kindly create JSFiddle reproducing the issue so that we can look into code, understand the scenario better and help you out.


    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.