legendMarkerType: String

Sets the Legend Marker to one of the options below. At dataPoint level, this property works only with Pie and Doughnut charts.


Default: “circle”
Options: “circle”, “square”, “cross”, “triangle”

var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
  data:[ {
   dataPoints: [
    {x: 10 , y: 50 , legendText: "Apple", legendMarkerType: "square" },

  ],

  },
 ]
 .
 .
});
chart.render();


Try it Yourself by Editing the Code below.



If you have any questions, please feel free to ask in our forums.Ask Question