ankane / react-chartkick

Create beautiful JavaScript charts with one line of React
https://chartkick.com/react
MIT License
1.2k stars 58 forks source link

[Idea] Set id attribute #44

Closed Caelesis closed 5 years ago

Caelesis commented 5 years ago

Hi,

Thanks for your work.

I'm currently trying to implement this lib in Gutenberg (WordPress) to create some nice charts. All is OK except a little thing. Guntenberg find a difference between markup of the save function and the front end returning markup. This difference is about the chart "id" attribute which they're not equal for back and front. Is it possible to add a config param to set the ID ? The ID could be choose from the back end and use for id attribute.

Thanks for your help and for your work!

ankane commented 5 years ago

Hey @Caelesis, not sure I fully understand. You can already set the id of a chart. https://github.com/ankane/react-chartkick#options

Caelesis commented 5 years ago

Sorry for disturbing, it's my bad, It works also with PieChart. Thanks for your quick reply, appreciated :wink:

ankane commented 5 years ago

No worries