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

Remove setter for canvas-id #77

Closed Joelius300 closed 5 years ago

Joelius300 commented 5 years ago

Describe the feature request

Every chart needs a canvas-id but there are no benefits of specifying it yourself. We should remove the setter and always use a new GUID-string. You can still access the id if you want to get the canvas in your own js-interop.

Which charts does this feature request apply to?

All

Describe the solution you'd like

The CanvasId-property of ConfigBase should be readonly and always receive a default value of Guid.NewGuid().ToString().

Describe alternatives you've considered

Manually specify them while also avoiding collisions.

Additional context

Idea and discussion from https://github.com/Joelius300/ChartJSBlazor/issues/76