Phake
Phake

Reputation: 1349

Flutter SfCharts label padding

How can I add padding to the labels, or position them further away from the plotting area? It currently looks like this, but I want to increase the red space:

enter image description here

I am using the SfCartesianChart from the flutter_syncfusion_charts package.

Upvotes: 0

Views: 1138

Answers (1)

yuva
yuva

Reputation: 551

I suggest you use the majorTickLines property in the axis, using this you can achieve your requirement by setting the size of the tick and setting the color as transparent. I have attached the code snippet below for your reference.

Code snippet:

primaryYAxis: NumericAxis(

    majorTickLines:

        const MajorTickLines(size: 15, color: Colors.transparent)),

UG: https://help.syncfusion.com/flutter/cartesian-charts/axis-customization#tick-lines-customization

Upvotes: 2

Related Questions