echarts icon indicating copy to clipboard operation
echarts copied to clipboard

feat(devInfo): set devInfo into axis component

Open sz-p opened this issue 3 years ago • 3 comments

Brief Information

This pull request is in the type of:

  • [ ] bug fixing
  • [x] new feature
  • [ ] others

What does this PR do?

  • set devInfo into axis component

Fixed issues

https://github.com/apache/echarts/issues/17697

Details

Before: What was the problem?

After: How does it behave after the fixing?

Document Info

One of the following should be checked.

  • [x] This PR doesn't relate to document changes
  • [ ] The document should be updated later
  • [ ] The document changes have been made in apache/echarts-doc#xxx

Misc

ZRender Changes

  • [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

  • [x] Please squash the commits into a single one when merging.

Other information

sz-p avatar Sep 25 '22 18:09 sz-p

Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

⚠️ MISSING DOCUMENT INFO: Please make sure one of the document options are checked in this PR's description. Search "Document Info" in the description of this PR. This should be done either by the author or the reviewers of the PR.

echarts-bot[bot] avatar Sep 25 '22 18:09 echarts-bot[bot]

@sz-p Hi, thanks for your contribution! I marked this PR as a draft as it needs further discussion to determine the necessity, design, and implementation.

plainheart avatar Sep 26 '22 13:09 plainheart

Thanks for the work! This information are very useful in the visual editor of ECharts.

Some suggestions or questions:

  1. The component level and sub-component level should be separated. For example:
eCompName: 'barBackground'

Is better to be

component: 'series.bar',
element: 'background' // Other name better than element will be appreciated.
  1. Naming should be consistent so it can be easily guessed by the developers. The naming rule should not expose the inside naming on the variables. For example:
eCompName: 'candlestickEl'

Is better to be

component: 'series.candlestick'
element: 'main' // Perhaps it can be optional if there is only one type of elements in the series. Which is the most common case

And

eCompName: 'barRect'

is better to be

component: 'series.bar'
element: 'main' // Perhaps it can be optional if there is only one type of elements in the series. Which is the most common case
  1. Should these information only available in the __DEV__ mode so we can ship less code in the final productions. And we can provide a utility method to add this __devInfo
if (__DEV__) {
  // The second parameters can be optional in most of series.
  addDevInfo(el, 'series.bar', 'main');
}

pissang avatar Nov 08 '22 10:11 pissang

The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-17698@b16e6be

github-actions[bot] avatar Apr 11 '25 04:04 github-actions[bot]