name: String

Sets the dataPoint Name. dataPoint name is shown in various places like toolTip & legend unless overridden.

Default: Automatically Named (“dataPoint 1”, “dataPoint 2” .. )
Example: “apple”, “mango” ..

  • If not provided, they are automatically named based on the order in which they are added. e.g. dataPoint 1, dataPoint 2 and so on.

var  chart =  new  CanvasJS.Chart("container",
 data: [{
   dataPoints: [
     {x: 5, y: 24, name: "apple"}


Try it Yourself by Editing the Code below.

  Also See:    

In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.