Styling left axis in fl_chart

186 views Asked by At

I like to style the left axis in fl_chart. Currently, the three values (1200.0, 1000.0, and 500.0) on the axis are jumped into two or three lines.

enter image description here

I like them to be on a single line and keep them a certain distance from the vertical line. Your suggestions are really appreciated.

1

There are 1 answers

0
Trung Nguyen On

After trials on changing various properties, I found that the increase in the reservedSize can extend the space of the sideTitle, allowing the texts to sit on the same line.

 sideTitles: SideTitles(
                  showTitles: true,
                  interval: 3,
                  reservedSize: 100, // try increase 
                  getTitlesWidget: leftTitleWidgets,
                ),