Skip to content
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

Proposal: abandon ChartKitSettings and use props instead #488

Open
vrozaev opened this issue Jun 7, 2024 · 0 comments
Open

Proposal: abandon ChartKitSettings and use props instead #488

vrozaev opened this issue Jun 7, 2024 · 0 comments
Labels
question Further information is requested

Comments

@vrozaev
Copy link

vrozaev commented Jun 7, 2024

Right now chartkit using ChartKitSettings singleton class for it's settings.

This might lead to a bug when developer trying to set several plugins in different modules;

// Module 1
settings.set({plugins: [YagrPlugin]});

// Module 2 
settings.set({plugins: [MyAmazingPlugin]});  

This code above might lead to error - one plugin will be overwrited with another, and chart will now be shown.

Proposal: lets pass chartkit settings to the chartkit as props.

<ChartKit type="d3" settings={settings} data={data} />
@korvin89 korvin89 added the question Further information is requested label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants