Joelius300 / ChartJSBlazor

This library is a modification of the awesome ChartJs.Blazor library by mariusmuntean. It's supposed to add more functionality to the LineChart and generally make the library more complete.
Other
40 stars 6 forks source link

Indexable options #63

Closed Joelius300 closed 5 years ago

Joelius300 commented 5 years ago

Fixes https://github.com/Joelius300/ChartJSBlazor/issues/45

This contains the base implementation for IndexableOption. We will need to do the other properties this applies to as well. We should do those on the fly or if requested. It might also be a good idea to create a list of places where this has to be done (new issue).
Currently I've only changed those which were set to a List<T> and only exposed a getter. This really bothered me since you were not able to not index the values and it also made creating the classes (e.g. PieDataset) a lot uglier because of the missing setter.

Both of these concerns are now fixed as you can see in the updated samples.

Side note: I implemented the newtonsoft converter since we're still depending on it anyway. I will rework this with the other converters once we are able to move away from json.net. The solution for the System.Text.Json converter is here.

Joelius300 commented 5 years ago

I think it would actually make sense to have it be a struct and use Nullable whenever it isn't required.

Joelius300 commented 5 years ago

Closing this as this is now covered by https://github.com/Joelius300/ChartJSBlazor/pull/67

SeppPenner commented 5 years ago

You can delete the branch indexable-options now, I assume?

Joelius300 commented 5 years ago

Correct :)