This is my fl_chart bar chart.
I need to add the 'AVG' text to the line as in the image below.
Any ideas? Really stuck. The line is returned under "getDrawingHorizontalLine" section below.
I could try and figure out where this line is and use a stack but doesn't sound too promising
return BarChart(
BarChartData(
barGroups: graphData,
alignment: BarChartAlignment.center,
groupsSpace: isPortrait ? null : 70,
minY: 0,
maxY: maxUsage,
gridData: FlGridData(
horizontalInterval: average,
checkToShowHorizontalLine: (value) => value == average, <----- draw when avg
drawHorizontalLine: true,
drawVerticalLine: false,
getDrawingHorizontalLine: (value) => FlLine( <------ draws the line
color: Colors.white,
strokeWidth: 1,
dashArray: [5, 5],
),
),