Series colors in Chart #464
Answered
by
beto-rodriguez
johannpistorius
asked this question in
Q&A
-
I'm using LiveChartsCore.SkiaSharpView.WPF Version: 2.0.0-beta.101 When adding a new series to a chart, a predetermined color is assigned to that series if a paint is not specified. Is it possible to get that color for future use? I have the following: ObservableCollection<ISeries> ChartResultsCartesian = new ObservableCollection<ISeries>();
ISeries serie = new LineSeries<double>
{
//set properties here
};
ChartResultsCartesian.Add(serie); which produces the following chart: When I change my series to a column series like so: ObservableCollection<ISeries> ChartResultsCartesian = new ObservableCollection<ISeries>();
ISeries serie = new ColumnSeries<double>
{
//set properties here
};
ChartResultsCartesian.Add(serie); I get the following: I would like to keep the same colors for both series. Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
beto-rodriguez
May 13, 2022
Replies: 1 comment 1 reply
-
You can just set your own: https://lvcharts.com/docs/WPF/2.0.0-beta.220/Overview.Paints |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
johannpistorius
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can just set your own:
https://lvcharts.com/docs/WPF/2.0.0-beta.220/Overview.Paints