Apache ECharts 5.6.0 Features
Define Region Styles in Original GeoJSON Data
ECharts maps use GeoJSON format to define data. In theory, following the principle of "separation of data and style", GeoJSON should only define data while styles should be defined in ECharts. However, in some cases, styles themselves are a form of data expression (for example: using dashed lines to represent disputed borders - here the "dashed line" is a style but actually expresses a data concept, so defining styles in GeoJSON is reasonable).
In ECharts 5.6.0, we support defining region styles in the original GeoJSON data by specifying features[].properties.echartsStyle
. This is consistent with the data option, which supports configuring itemStyle
, label
, tooltip
etc. Example:
geoJSON.features[0].properties.echartsStyle = {
itemStyle: {
areaColor: 'green'
}
}
geoJSON.features[1].properties.echartsStyle = {
selected: true,
label: {
formatter: 'Default Selected:\n{b}'
}
}
geoJSON.features[2].properties.echartsStyle = {
itemStyle: {
borderType: 'dotted',
borderColor: 'blue'
}
}
geoJSON.features[11].properties.echartsStyle = {
itemStyle: {
// This region will be overridden as `cyan` by the data item option
areaColor: 'black'
},
tooltip: {
formatter: function (params) {
return 'This is a custom tooltip from GeoJSON: ' + params.name;
}
}
}
Axis Labels Support Tooltips
In some cases, axis labels are too long or we want to display more information on axis labels. In ECharts 5.6.0, we support adding tooltips to axis labels. The configuration is consistent with the tooltip
option, please refer to axis.tooltip documentation for details.
Sunburst Chart Supports Focusing All Descendants and Ancestors
In previous versions of sunburst charts, emphasis.focus supported the following values:
'none'
Do not fade out other data, it's by default.'self'
Only focus (not fade out) the element of the currently highlighted data.'series'
Focus on all elements of the series which the currently highlighted data belongs to.'ancestor'
Focus on all ancestor nodes. 'descendant' Focus on all descendants nodes.
In ECharts 5.6.0, we added 'relative'
, which focuses on all descendants and ancestor nodes.
Added Support for Two New Languages
In this version, support for Swedish and Persian languages has been added. With this, ECharts now supports 22 languages.
Line Chart Performance Optimization
In this version, we optimized the rendering performance of line charts, solving the problem of memory growth with time.
Complete Changelog
View the changelog
The next major version, Apache ECharts 6.0.0, is currently being actively developed and is expected to be released in the first quarter of 2025. Stay tuned for more updates.