-
Notifications
You must be signed in to change notification settings - Fork 914
Closed
Description
I'm using the PlotBands to show horizontal lines at certain positions. The lines are customized to show as dashed lines.
This works as expected on iOS but the line shows up without dashing on the web.
I'm using flutter 2.5.3 and syncfusion_flutter_charts: ^19.3.56.
Here is the code to reproduce:
class ChartData {
final DateTime x;
final double y;
ChartData(this.x, this.y);
}
class PlotLineChart extends StatefulWidget {
const PlotLineChart({Key? key}) : super(key: key);
@override
State<PlotLineChart> createState() => _PlotLineChartState();
}
class _PlotLineChartState extends State<PlotLineChart> {
final List<ChartData> data = [
ChartData(DateTime(2000, 1, 1), 1),
ChartData(DateTime(2000, 1, 9), 9),
];
@override
Widget build(BuildContext context) {
return SfCartesianChart(
primaryXAxis: DateTimeAxis(),
primaryYAxis: NumericAxis(
plotBands: [
PlotBand(start: 5.3, end: 5.3, borderWidth: 2, dashArray: const [5, 9]),
PlotBand(start: 2.3, end: 2.3, borderWidth: 1, dashArray: const [4, 6]),
],
),
series: _createSeries(),
);
}
List<FastLineSeries<ChartData, DateTime>> _createSeries() {
return [
FastLineSeries<ChartData, DateTime>(
dataSource: data,
xValueMapper: (ChartData d, _) => d.x,
yValueMapper: (ChartData d, _) => d.y,
markerSettings: const MarkerSettings(isVisible: true),
),
];
}
}
Metadata
Metadata
Assignees
Labels
No labels

