Skip to content

feat(devInfo): set devInfo into axis component #17698

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

Draft
wants to merge 2 commits into
base: v6
Choose a base branch
from
Draft

Conversation

sz-p
Copy link
Contributor

@sz-p sz-p commented Sep 25, 2022

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

  • set devInfo into axis component

Fixed 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.

  • 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

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

Other information

@echarts-bot
Copy link

echarts-bot bot commented Sep 25, 2022

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.

@plainheart plainheart marked this pull request as draft September 26, 2022 00:55
@sz-p sz-p marked this pull request as ready for review September 26, 2022 11:58
@plainheart plainheart marked this pull request as draft September 26, 2022 13:50
@plainheart
Copy link
Member

@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 plainheart added the discussion-required Further discussion is required before we decide if this issue should be fixed. label Sep 26, 2022
@pull-request-size pull-request-size bot added size/L and removed size/M labels Oct 20, 2022
@pissang
Copy link
Contributor

pissang commented Nov 8, 2022

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');
}

@pull-request-size pull-request-size bot added size/XL and removed size/L labels Nov 9, 2022
@sz-p sz-p force-pushed the master branch 3 times, most recently from 63cb828 to ddaa123 Compare December 27, 2022 11:47
@sz-p sz-p changed the base branch from master to v6 April 10, 2025 11:32
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion-required Further discussion is required before we decide if this issue should be fixed. PR: doc unchanged PR: first-time contributor size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants