NativeScript UI Chart Legend: change label to square

Issue

How do I change the legend label of a pie chart to a square. I looked at the example code but it does not change the label to a square for me.

<RadCartesianChart height="300">
  <CategoricalAxis tkCartesianVerticalAxis></CategoricalAxis>
  <LinearAxis tkCartesianHorizontalAxis></LinearAxis>

  <BarSeries tkCartesianSeries
              [showLabels]="true"
              [items]="sampleData"
              categoryProperty="name"
              valueProperty="value">
    <PointLabelStyle tkBarLabelStyle
                      margin="10"
                      textSize="10"></PointLabelStyle>
  </BarSeries>
</RadCartesianChart>

Solution

I don’t think such customisation is supported, by default it seems to be square in Android and circle in iOS.

You might have to raise a feature request if you like that option.

Answered By – Manoj

Answer Checked By – Pedro (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.