-
Notifications
You must be signed in to change notification settings - Fork 601
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
Dynamically Set Geometry Path for a Series #410
Comments
Hi, thank you for your work on this library. i am using the newest beta800 version but I still do not get how to map series to svg paths without creating mutliple classes. I might be to dumb, but since the introduced path function has to be static and the OnDraw call gives no reference to the series itself there is no real way to map these two values. So the only possibility seems still to create multiple classes for all cases. I hope I don't miss something obvious. Best regards |
Hi @Zottel92 The web site needs to update the image, but the article is updated: https://lvcharts.com/docs/WPF/2.0.0-beta.850/samples.lines.custom In that sample, the geometry is changed when you click on a point. |
thanks for the quick reply. (sorry that I wrote the wrong version in the first answer, i use 2.0.0-beta.850) I saw that example-page and also have run the example code on my machine. Example: Best regards |
For my Problem I now create a new Geometry Class at runtime for every Series via TypeBuilder
But that is not optimal and ugly. So the possibility to edit the Geometry on a Series Level would be very desirable. Best regards |
I think we can simplify this. |
This is already included in beta.900, here is an example: |
Thank you so much. |
Is your feature request related to a problem? Please describe.
Ability to set the SVGPath or the SKPath Dynamically and not defined exclusively in the 'MyGeometry' Class.
Describe the solution you'd like
Our solution allows users to dynamically change the graph type and geometry (and colours line thickness etc). There is the ability to set the GeometryFill and GeometryStroke and GeometrySize.
A VERY WELCOMED :-) addition would be to set the Path or SKPath object for a series. This will allow changes to the shape of the geometry dynamically.
Describe alternatives you've considered
We have tried to use the current solution provided, however using a static variable will change the geometry for ALL series.
We could resolve this by creating a template for every eventuality, but this would make our code quite unruly with unrealistic cases to manage throughout our development.
if(line && circle) series = new LineSeries<ObservablePoint,MyCircle>
else if(line && square) series = new LineSeries<ObservablePoint,MySquare>
else if(line && cross) series = new LineSeries<ObservablePoint,MyCross>
...
else if(lineArea && circle) = new LineAreaSeries<ObservablePoint,MyCircle>
...
And that is JUST the creation of a series...
Additional context
The text was updated successfully, but these errors were encountered: