legendMarkerColor: String

Sets the color of marker that is displayed on legend. This property works only with Pie and Doughnut charts. Value of legendMarkerColor can be “HTML Color Name” or “hex” code.

Default: dataSeries marker color
Example: “red”, “#008000”..

  • This Property overrides default Marker’s Color in Legend.

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



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.