Home forums Using CanvasJS Multiple Datapoints Shifting

This topic contains 2 replies, has 2 voices, and was last updated by  Chandrakala I 2 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22141

    The default behavior of shift(), it seems it is only possible to shift one dataPoint at a time from the array.
    But I want to shift the multiple number of data points at a time, probably by passing a dynamic number and want to shift that number of points from datapoints array.

    Is it possible? Can any one help me?

    Thanks in advance.

    #22143

    Vishwas R
    Keymaster

    @chandrakala-i,

    Shift is a JavaScript array method that removes the first element from an array whereas slice is an array method that returns a shallow copy of a portion of an array. You can use slice method to remove specific number of elements from dataPoints array.


    Vishwas R
    Team CanvasJS

    #22147

    Thank you :)

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

You must be logged in to reply to this topic.