Suyash
Suyash

Reputation: 71

How to add the border to the pie chart?

In lightningchartJS how can I add border to my pie chart? Where a whole chart has a border as well as the individual category also has a border.

pie.setLabelFormatter(SliceLabelFormatters.NamePlusRelativeValue).setSliceStrokeStyle({color: ColorRGBA(200, 200, 200)})

Upvotes: 0

Views: 630

Answers (1)

terhoLCJS
terhoLCJS

Reputation: 391

You can use the PieChart.setSliceStrokeStyle method to set a border that is used for all Slices in the chart.

pieChart.setSliceStrokeStyle(
  new SolidLine( {
    thickness: 3,
    fillStyle: new SolidFill( { color: ColorRGBA( 200, 200, 200 ) } )
  } )
)

Upvotes: 1

Related Questions