Open Arnooow opened 4 years ago
It is supposed to be like
LineChartController.painter.highlightValues([ h1, h2 ]);
But I couldn't get that to work
It is supposed to be like
LineChartController.painter.highlightValues([ h1, h2 ]);
But I couldn't get that to work
For a single value I found the following was also necessary:
controller.state?.lastHighlighted =
highlights.length == 0 ? null : highlights[0];
The state must be updated because the painter is recreated every time build
is called on the chart.
@Arnooow have you find any solution to this?
It is supposed to be like
LineChartController.painter.highlightValues([ h1, h2 ]);
But I couldn't get that to work
I did add this to the line_chart_controller.dart
,
void highlight(List<Highlight> highlights) {
painter?.highlightValues(highlights);
state?.lastHighlighted = highlights.length == 0 ? null : highlights[0];
state?.setStateIfNotDispose();
}
yet it didn't seem to work
Hi everyone,
First thanks for this incredible work to import MPandroidChart in flutter !
Is it possible to highlight several values ? Like we can do in MPAndroidChart with
chart.highlightValues(new Highlight[] {h1, h2});
Arno