-
Notifications
You must be signed in to change notification settings - Fork 151
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
Creation of mixed charts should be possible also in version 2.0.0 #133
Comments
There are multiple solutions to this with both pros and cons. I'm not listing The simple approachInstead of having the dataset-collections, we could just have a Pros
Cons
The more complex and explicit approachThis approach still uses dataset-collections and they would be implemented similarly but even more restrictive. The dataset-collection would provide methods to add only supported datasets for the same chart-type. So the Then in addition to the "supported" datasets, you could also add any other Pros
Cons
What do you think? Which solution do you think is more enjoyable to use? My vote is for the simple solution. It's less work, less complexity and the complex solution doesn't seems to provide enough value to be worth the cons and especially the work. 1 When thinking about this point you should consider that the basic pattern is to store a reference to your dataset and modify it with that reference. You shouldn't need to query the datasets of a chart and thus typesafety looses importance. ⏎ |
Because your library is based on chart js, it might make sense to provide a similar API: there it is implemented on a dataset level, so both your approaches correspond to their philosophy, and if the first one is the easier one, it would be just fine |
Agreed. One thing to consider is that the options can be mixed as well as far as I know. That shouldn't be possible for every chart though but we could create a new chart config which allows for more or less dynamic object that can be composed of several configs. Something like their Or we could leave it as is and let the user plug in their own implementation of a chart config which makes it so they can extend any config by deriving from it and then using that type in |
If an example, where it is explained how to derive and use inheritance, becomes available, it will be quite okay, I think |
Describe the bug
It should be possible to create mixed charts that are a combination of two or more different chart types. E.g. see a code, which works with ChartJs.Blazor version 1.1.0, below
Which Blazor project type is your bug related to?
Code example
Please provide full code examples below where possible to make it easier for the developers to check your issues.
The text was updated successfully, but these errors were encountered: