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”..
Notes
  • 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"},

  ],

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

Try Editing The Code


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