verticalTextPadding property
To move the plot band text vertically.
Takes pixel or percentage value. For pixel, input should be like 10px
and for percentage
input should be like 10%
. If no suffix is specified (10
), it will be considered as pixel value.
Percentage value referes to the overall height of the chart. i.e. 100% is equal to the height
of the chart.
This is applicable for both vertical and horizontal axis. Positive value for this property moves the text upwards and negative value moves downwards.
If verticalTextAlignment or horizontalTextAlignment is specified, text padding will be calculated from that modified position.
Defaults to null
.
Widget build(BuildContext context) {
return Container(
child: SfCartesianChart(
primaryXAxis: NumericAxis(
plotBands: <PlotBand>[
PlotBand(
verticalTextPadding:'30%',
)
]
)
)
);
}
Implementation
final String? verticalTextPadding;