legendMarkerBorderColor: String

Sets the border color around legend marker. Value of legendMarkerBorderColor can be “color names” or “hex code” . This property works only with Pie and Doughnut charts. If not set, takes the value from dataSeries’ legendMarkerBorderColor if present.

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

  • There is no border in Legend Marker Type “cross”, hence legendMarkerBorderColor doesn’t apply when legendMarkerType is “cross”

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



Try it Yourself by Editing the Code below.

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.