showInLegend: Boolean

Setting this property to true makes dataPoints to appear in legend.

Default: false
Options: false, true
Notes
  • You can individually choose the dataPoints to be shown in legend.
  • It overrides showInLegend of dataSeries.
  • Individual dataPoints are not shown in legend in chart types other than pie and doughnut
var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
	data: [
	{
		type: "pie",
		dataPoints: [
			{ y : 10, showInLegend: true},
		]
	}
	]
 .
 . 
});
chart.render();

Try Editing The Code

  Also See:    


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