[Feature] 类目轴有没有什么办法能实现强制显示最大、最小刻度,且中间坐标平均分段显示?

Open
#21,501 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start by tracing category-axis label layout and the existing axisLabel.interval and axisLabel.formatter behavior. Define how the maximum and minimum labels constrain the intermediate labels, then verify that labels are evenly spaced across the shown range without requiring data- or container-specific configuration.

Written by the indexing model from the issue text.

Description

new-feature pending
What problem does this feature solve?
Image x轴虽然通过showMaxLabel、showMinLabel强制显示了最大、最小值,但是中间的坐标没有平均分段显示(2024-03-31到2025-09-30的间隔明显和前面的间隔)不一样
What does the proposed API look like?

能不能让最大刻度、最小刻度之间的刻度平均分段显示?现在虽然可以通过设置axisLabel.interval、axisLabel.formatter等方式实现,但都比较麻烦,需要根据数据量、容器宽度等变量动态设置,有没有现成的api能实现类似效果?

Dominant language
TypeScript
Stars
67.7k
Forks
19.9k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/echarts

All issues in apache/echarts

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.