-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
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
Map Values to Fill / Stroke Color #229
Comments
Any chance the "Point Mapper" feature has been added to livecharts2 yet? LiveCharts1 Mapper: LiveCharts1 Change Color with Mapper: I noticed a "Mapping" action in the Series class however am not sure how this can be implemented as the Series.Mapper is no longer possible in livecharts2... |
For now I am able to do the following but not what we need:
Where mapper is:
|
Looks like some people are also using the point created event. Haven't tried it myself though. |
This is already supported and will be included in the next version of the library: // full sample at:
// https://github.com/beto-rodriguez/LiveCharts2/blob/dev/samples/ViewModelsSamples/General/ConditionalDraw/ViewModel.cs
var series1 = new ColumnSeries<ObservableValue>
{
Values = new ObservableValue[] { new(2), new(5), new(4), new(6), new(8), new(3), new(2), new(4), new(6) }
};
series1
.WithConditionalPaint(new SolidColorPaint(SKColors.Black))
.When(point => point.Model?.Value > 5); |
Is your feature request related to a problem? Please describe.
There used to be a way to map values to fill/stroke for individual points. I'm unsure if this is supported or not. I can't seem to find a way to do this in live charts 2.
Past Issue for reference: Live-Charts/Live-Charts#162
Describe the solution you'd like
A way for a HasMap configuration to be able to modify point's fill and stroke (possibly other properties).
Describe alternatives you've considered
Maybe charts could have some kind of PointFormatter that can modify point related properties before they are graphed?
(similar to DataLabelsFormatter)
Additional context
Not much to add since this was previous disgusted in Live charts v1. It's just really handy to be able to modify the color of certain points based on their values.
The text was updated successfully, but these errors were encountered: