Please visit the official Apache ECharts Website at

https://echarts.apache.org
Visit Official Website
x

FAQ

Frequently asked questions

Apache EChartsTM

General Questions

What to do if you have technical problem?

1)It is recommended that you read the navigation on the left side of the option manual before you ask questions. In the option manual, you can find out what configuration items does ECharts have. And you can find under the relevant components whether there are configuration items that can implement the functions you need.

2)Browse FAQ questions on this page.

3)Create a simple example to reproduce your problem on ECharts Gallery. If you can't use the code to describe the requirements, you can try to provide a design draft or draw a sketch.

4)Paste the link when you ask questions on stackoverflow, OSCHINA or segmentfault.com and etc. Plaes attach the example link.

Is ECharts free to use?

Yes, ECharts is open-sourced under Apache License 2.0.

Axis

What should I do if the axis label don`t have enough space?

You can use interval to control how many labels are displayed, set it to 0 to display all labels.

Or you can set axisLabel.rotate to rotate the label a certain angle.

Why does it not work when you want to put the axis on the right side?

You need to set onZero to false.

How do I force the first / last label of the axis to be displayed?

Both axisLabel.showMinLabel and axisLabel.showMaxLabel are supported since ECharts version 3.5.2. It can be used to control whether the first / last tags are forced to display.

If you can't update the version, please refer to this example to achieve the same effect.

legend

What should I do if the legend area overlapped on the chart?

You can set the grid to control the position of the chart area. For example, Set a larger grid.top to move drawing area down.

We are planning to make the layout smarter in the future versions.

line-chart

The ticks on the coordinate axis seems different with the data?

Check if you set the stack. You should remove it if you don't want to make a stack line chart.

bar-chart

Why does the y-axis scale disappear when the values are small?

Version 3.5 of ECharts has been fixed this issue.

map-chart

Province names overlap on the chart. How to modify the location of the names?

You can modify the cp coordinates of the corresponding province in the map file (JS or JSON), or modify the map data that has been loaded by echarts.getMap('china').

For more details, please refer to GitHub.

Where can I download maps from other countries?

Map information for other countries can be downloaded from here.

How can I get the zoom event of a map?

First, you need to set the series's roam to true and then listen for the 'georoam' event. Such as:

myChart.on('georoam', function (params) {
   console.log(params);
});

Please refer to this example.

How to make my custom map?

The ECharts map is additionally encoded from original coordinates. You can use the mapshaper-plus tool to upload a custom geojson file and then generate a map file that can be used in Echarts.

baidu-map

How to use ECharts with Baidu map?

  1. Include echarts.js, bmap.js and https://api.map.baidu.com/api?v=2.0&ak=Here is the access key you obtained on the Baidu development platform.
  2. Set bmap in option,You can refer to this example.
  3. If you need to get a Baidu map instance, you can use chart.getModel().getComponent('bmap').getBMap(),and then make do settings based on Baidu Maps API .

There are more examples about Baidu maps on ECharts Gallery , which can be used as a reference.

gauge-chart

How to set the dashboard color?

You can use axisLine.lineStyle.color.

Event processing

How do I get events such as chart clicks?

Pelease read official website tutorial. The types of events supported by ECharts can be found in the related API.

others

Why is the chart not displayed?

You can check the following situations:

  • Whether echarts.js is loaded normally.
  • Whetherecharts variable exists.
  • Whether the DOM container has a width or height when calling echarts.init.

Where can I learn ECharts?

The official website is the best learning platform. In addition, learning other people's work on the ECharts Gallery is also a good choice.

ECharts related projects and resources can be found at awesome-echarts.