Skip to content

[Feature] Show axisLabels on X-axis from points in my data #19605

Open

Description

@YogeshK-Itanta

What problem does this feature solve?

Currently, when we plot a line chart with option.xAxis.type="time", echarts automatically calculates the points which are going to be shown on X axis according to the start and end point from our series data. We have option to whether to show these points or not using some formatting tricks, but it will only show the points at the intervals calculated by echarts.

Sometimes, what happens is that there are no co-inciding points between those and time in data points.
Live Example: https://shorturl.at/djpAF
In the above case, we don't get a time label that is exactly below my data point.

I want the time axis labels to be shown directly under the data point (It doesn't matter if they are being plotted at equal interval or not).

I have tried various configurations, but could not get the desired result. Please tell me if I have missed something, else this feature could be really benificial.

What does the proposed API look like?

option.xAxis.showCustomPoints: true
or something like this.

Activity

  1. added
    en
    pending
    on Feb 9, 2024
  2. Ovilia commented on Feb 26, 2024

    @Ovilia
    Contributor

    In time axes, the ticks are calculated without the knowledge of data values, which is the same as value axes. I think this is a good feature to have, since we don't have the ability to let developers decide where the ticks should be for now. Let's see what we can do in ECharts 6.

  3. added this to the 6.0.0 milestone on Feb 26, 2024
  4. moved this to Pending in ECharts 6.0on Feb 26, 2024
  5. modified the milestones: 6.0.0, 6.x on Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ennew-featurepending

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions