We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
belowBarData
Hi,
I'm trying to create a Sparkline chart that has belowBarData enabled with a color.
However, the start and end of the belowBarData's color does not fit the size of the chart.
Here is how the Widget looks like:
As you can see the line's a bit wider than the belowBarData color:
I would expect that the belowBarData's color is also underneath the caps.
class Sparkline extends StatelessWidget { final List<double> data; const Sparkline({ super.key, required this.data, }); @override Widget build(final BuildContext context) => LineChart( LineChartData( minY: 0, gridData: const FlGridData( show: false, ), borderData: FlBorderData( show: false, ), titlesData: const FlTitlesData( show: false, ), lineTouchData: const LineTouchData( enabled: false ), lineBarsData: [ LineChartBarData( color: const Color(0xFF17B26A), spots: data .mapIndexed((final index, final e) => FlSpot(index.toDouble(), e)) .toList(growable: false), dotData: const FlDotData( show: false, ), barWidth: 4, isStrokeCapRound: true, isStrokeJoinRound: true, belowBarData: BarAreaData( color: Colors.red, show: true, ), ), ], ), ); } // Example call: Sparkline(data: [2, 3.1, 3.5, 2.8, 5.4, 9.2, 2.4, 3.5, 5.4, 7, ]);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I'm trying to create a Sparkline chart that has
belowBarData
enabled with a color.However, the start and end of the
belowBarData
's color does not fit the size of the chart.Here is how the Widget looks like:
As you can see the line's a bit wider than the
belowBarData
color:I would expect that the
belowBarData
's color is also underneath the caps.The text was updated successfully, but these errors were encountered: