Apache ECharts: "time" Axis labels are overlapping when using DataZoom

I am using Apache ECharts to create a line chart with an Y Axis of type "value" and an X Axis of type "time". I am also implementing dataZoom on the X Axis, which is working correctly. The problem is that when I move the dataZoom a bit, this happens:

enter image description here

My data consist of series with actual Date objects for the X axis, like:

enter image description here

Then, I have the following config for the X Axis. As you can see, I have specified a formatter in the Axis to convert dates to strings, which also works correctly.

enter image description here

Finally, my DataZoom config is just:

{ dataZoom: [{}] }

I am setting the same config as other time charts in ECharts official examples, but I am still getting this error. Any ideas?

Upvotes: 1

Views: 2685

Answers (1)

Sabin Koju
Sabin Koju

Reputation: 11

xAxis: {
      axisLabel: {
        hideOverlap: true,
      }
}

This should solve the overlapping issue.

Upvotes: 1

Related Questions