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

[Feature] Why is the use() extension mechanism not mentioned in the official documentation? #17313

Closed
wang1212 opened this issue Jul 4, 2022 · 6 comments
Labels
doc Document or Website related issues. en This issue is in English

Comments

@wang1212
Copy link

wang1212 commented Jul 4, 2022

What problem does this feature solve?

An official plugin/extension mechanism with safer and more flexible extension capabilities.

What does the proposed API look like?

When viewing the source code, the use() API provides a good extension mechanism and is fully used in the source code.

Why is it not mentioned in the official documentation? Or is it that I didn't find it? I have only got very limited information from the documentation for the import on demand section.

@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Jul 4, 2022
@plainheart
Copy link
Member

It's mentioned at https://echarts.apache.org/api.html#echarts.use. What information are you expecting to get more?

@plainheart plainheart added doc Document or Website related issues. and removed new-feature pending We are not sure about whether this is a bug/new feature. labels Jul 4, 2022
@wang1212
Copy link
Author

wang1212 commented Jul 4, 2022

It's mentioned at echarts.apache.org/api.html#echarts.use. What information are you expecting to get more?

I'm concerned with how to extend echarts instead of using use() to implement on-demand import.

@plainheart
Copy link
Member

Got it. But I'm afraid you have to read the source to learn about the related usage. We have no available documentation to indicate so many internal APIs yet.

@wang1212
Copy link
Author

wang1212 commented Jul 5, 2022

Got it. But I'm afraid you have to read the source to learn about the related usage. We have no available documentation to indicate so many internal APIs yet.

Actually, I'm just trying to figure out why this extension mechanism API is not mentioned in the official documentation.

If it's just because the maintenance team doesn't have time to write documentation, there's nothing to worry about. However, if the APIs seen from the source code are not officially recommended, is there a big risk in using these APIs?

In other words, I see from the source code that the use() API is the official way to expose (register) various chart components and is widely used, so can I consider this extension mechanism to be stable at present , is it safe to use by external users?

@plainheart
Copy link
Member

The APIs mounted in the global echarts usually are safe to be used by the developers. Please rest assured to use the use API.

@wang1212
Copy link
Author

wang1212 commented Jul 5, 2022

The APIs mounted in the global echarts usually are safe to be used by the developers. Please rest assured to use the use API.

Ok, I see. Thank you very much for your prompt reply.


To say some digressions, after a preliminary understanding, it is a good mechanism to use the use() API to extend ECharts, but the relevant information on the Internet is very limited (or even no), I hope this mechanism can be known by more people , in order to facilitate users to realize personalized functions in specific scenarios.

@wang1212 wang1212 closed this as completed Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Document or Website related issues. en This issue is in English
Projects
None yet
Development

No branches or pull requests

2 participants