You must be logged in to post your query.
Home › Forums › Chart Support › Scatter Charts X values sorted default
Tagged: Scatter Chart sorted x values
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?
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.
You must be logged in to reply to this topic. Login/Register