5.0.0
v5.0.0
- Migrate codebase to TypeScript:
- The entire code base have been migrated to TypeScript.
- Provide
types/dist/echarts.d.tsfor the upper TS based applications, where the TS version supported is down to 3.4. - See more details in #13563
- [Feature] States enhancement:
- Support state transition animation, which brings better interaction effect when highlighting or downplaying some part of the chart.
- Besides the state "emphasis" we already have, v5.0 provides two more configurable state: "select" and "blur" in all series. The option of them are the same as the existing "emphasis". "blur" is used the elements need to fade out when focusing some other elements. "select" is used when the element is selected by mouse/touch click or API triggering.
- Support to blur other graphic elements when highlighting specified data through mouseover or hover linking. See examples bar-label-rotation, bar-polar-stack, bar-stack, area-stack, dataset-link, scatter-weight, tree-basic.
- Unify the previous different state configurations in series, like
highlightPolicy,focusNodeAdjacency,hoverOffset, by the optionfocus,blurScopeandscale. See examples sankey-energy, graph, sunburst-drink. - See more details in #12925 and #12911.
- [Feature] Provide a more powerful label support:
- Use some strategies to bring better displayed labels, including:
- Smarter text color strategy to make labels more easy to be distinguished from different background.
- Smarter label layout in pie chart, especially when there are too many labels or insufficient space. And related issue: #6050.
- Provide more overflow configurations.
- Provide option set
labelLayoutto enable more abilities for developers to tweak the layout of the labels after it's originally positioned by the chart itself. With the options inlabelLayout, developers can:- Avoid labels overlap (see scatter-label-align-right),
- Make special label alignment, and adjust label position, etc.. See the examples pie-alignTo, pie-labelLine-adjust, pie-label-distanceToLabelLine, pie-label-bleedMargin.
- Make label draggable.
- Support
labelLinefor all series, which is very useful for guiding element to related labels when labels have to be far away from the elements. See examples scatter-label-align-right, scatter-label-align-top. Related issues: #11534, #12971. - See more details in #12911.
- Use some strategies to bring better displayed labels, including:
- [Feature] Chart racing, bar realtime sorting and label animation:
- Bar race and line race is a popular way to show time series data, and visualize the change in trends over time.
- We provide this capability by bar sorting (
series.sortandseries.realtimeSort) and end label animation (series.label.valueAnimation,series.endLabel). And this individual options can be used in other related scenarios. - See examples bar-race, and see more details in the original pull request #12484, #13246 and #13045.
- We provide this capability by bar sorting (
- Other the racing of some special customized chart can be implemented by custom series and the callback of renderItem
during. See the example custom-spiral-race, and see more details in #12775.
- Bar race and line race is a popular way to show time series data, and visualize the change in trends over time.
- [Feature] Support data transform plug-in:
- Data transform is a new set of configurations and APIs to enable data transformation based on
datasetin declarative way. Built-in or third-party data transformer can be made as plug-ins to provide various transform algorithms. ECharts users can use those transformers in ECharts option. - See examples data-transform-filter, data-transform-sort-bar, data-transform-multiple-pie, doc-example/data-transform-multiple-sort-bar, boxplot-light-velocity, bar-histogram, scatter-clustering, scatter-exponential-regression, scatter-linear-regression, scatter-logarithmic-regression, scatter-polynomial-regression. See more details in #13065, #13127](#13127).
- Data transform is a new set of configurations and APIs to enable data transformation based on
- [Feature] Provide more smarter time axis label and tick arrangement:
- See more details in #12859.
- [Feature] Support
decal:- Decal provides a new visual type that does not only augment aria scenarios but also enrich visual effects.
- See more details in #13304.
- [Feature] Provide custom series animation configuration in transform, style, shape morphing/combining/separating.
- See examples custom-combine-separate-morph, custom-one-to-one-morph, custom-story-transition, custom-spiral-race, custom-gauge.
- See more details in #12775, #13468, #13271.
- [Feature] Provide a more powerful gauge:
- See examples gauge-barometer, gauge-clock, gauge-multi-title, gauge-progress, gauge-ring, gauge-grade, gauge-simple, gauge-temperature.
- See more details in #13416.
- [Feature] The default theme and interaction have been greatly enhanced. Some new options are provided for the style and interaction configuration:
- Tooltip style enhancement: #12947, #13398, #13242.
- Provide configurable dash style: #12961.
- Axis style enhancement: #13046.
- DataZoom support both brush and drag: #13025.
- Support
darkMode. 12911. - Enhance resize & dataZoom animation: #12965
- Change the closing direction of a single bar, #12543.
- Enhance pie chart animation #12553.
- Other component style enhancement: #13008, #13013.
- [Feature] Make i18n registerable and change the product.
- [Feature] Support rounded corner in pie and sunburst:
- [Feature] Make tooltip more configurable:
- [Feature] Support to partially remove components or replace components:
- See details in #12987.
- [Enhancement] Enhance performance in some scenarios:
- Other small features, enhancements and bug-fixes:
- [Feature] Enhance
parseDate#13044. - [Feature] Make line bolder when line is in emphasis state #13013.
- [Feature] Sankey supports
lineStyle: {color: 'gradient'}. - [Feature]
markPoint.data.typeandmarkArea.data.typesupport the value'median'. - [Feature] Support axis filter in specific cases. #12832.
- [Fix] Fix bmap first layout may be incorrect if container's layout is flex or grid. #13432.
- [Fix] Hide tooltip when mouse leaves the chart #13382.
- [Fix] Fix bmap personalization style does not work. #13214.
- [Fix] Fix the bug of overriding title when click the stack button. #13372.
- [Fix] Fix ECharts keeps rendering white blanks with large datasets on single canvas mode #13283.
- [Fix] Make
contentToOptiontotally optional. #13139. - [Fix] Keep axis tooltip open on refresh. #13100.
- [Fix] Skip rendering for data out of axis content in heatmap. #12991.
- [Feature] Enhance
- [Break] Breaking changes against v4.9:
- The default theme colors has been changed. If intending to use the theme of 4.9-, please set
option.color = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];. - Remove built-in map geoJSON. #13565.
- The exported modules from
'echarts/lib/export.js'is not mounted to'echarts/lib/echarts.js'by default. If the upper application previously usedimport echarts from 'echarts/lib/echarts'and used any of the exported modules in'echarts/lib/export.js', please change the import code toimport echarts from 'echarts/index.blank', where the modules from'echarts/lib/export.js'are mounted by default. - If the upper application previously imported
src/echarts.js,src/chart/*.jsandsrc/component/*.js, it can not work any more because all of the files in/srcfolder are migrated to*.ts. Instead, the upper application can importesm/echarts.js,esm/chart/*.jsandesm/component/*.js. - Drop the support of the legacy IE8. The previous VML renderer (necessary in IE8) will not be updated to work in v5.0 util someone proposed with their real scenario.
- The priority of the visuals between
visualMapanditemStyle|lineStyle|areaStyleare reversed. That is, previously, the visuals (i.e., color, symbol, symbolSize, ...) that generated by the componentvisualMaphas highest priority, which will overwrite the same visuals specified initemStyle|lineStyle|areaStyle. That brought trouble to specify specific style to some certain data items. Since v5.0, the visuals specified initemStyle|lineStyle|areaStylehas highest priority. - The behavior of
rich.?.paddingare changed. Previouslyrich.?.padding: [11, 22, 33, 44]indicates that the top padding is33and the bottom padding is11, which is a buggy implementation because it is different from what CSS did. Since v5.0, we fix it:rich.?.padding: [11, 22, 33, 44]indicates the top padding is11and the bottom padding is33. ariais not included indist/echarts.simple(.min).jssince v5.0. But it is still included indist/echarts.common(.min).jsanddist/echarts(.min).js.
- The default theme colors has been changed. If intending to use the theme of 4.9-, please set
- [Deprecated] Deprecated usages since v5.0:
- Transform related props of a graphic element are changed:
- Changes:
position: [number, number]are changed tox: number/y: number.scale: [number, number]are changed toscaleX: number/scaleY: number.origin: [number, number]are changed tooriginX: number/originY: number.
- The
position,scaleandoriginare still supported but deprecated. - It effects these places:
- In the
graphiccomponents: the declarations of each element. - In
custom series: the declarations of each element in the return ofrenderItem. - Directly use zrender graphic elements.
- In the
- Changes:
- Text related props on graphic elements are changed:
- Changes:
- The declaration of attached text (or say, rect text) are changed.
- Prop
style.textare deprecated in elements exceptText. Instead, Prop settextContentandtextConfigare provided to support more powerful capabilities. - These related props at the left part below are deprecated. Use the right part below instead.
- textPosition => textConfig.position
- textOffset => textConfig.offset
- textRotation => textConfig.rotation
- textDistance => textConfig.distance
- Prop
- The props at the left part below are deprecated in
styleandstyle.rich.?. Use the props at the right part below instead.- textFill => fill
- textStroke => stroke
- textFont => font
- textStrokeWidth => lineWidth
- textAlign => align
- textVerticalAlign => verticalAlign;
- textLineHeight =>lineHeight
- textWidth => width
- textHeight => hight
- textBackgroundColor => backgroundColor
- textPadding => padding
- textBorderColor => borderColor
- textBorderWidth => borderWidth
- textBorderRadius => borderRadius
- textBoxShadowColor => shadowColor
- textBoxShadowBlur => shadowBlur
- textBoxShadowOffsetX => shadowOffsetX
- textBoxShadowOffsetY => shadowOffsetY
- Note: these props are not changed:
- textShadowColor
- textShadowBlur
- textShadowOffsetX
- textShadowOffsetY
- The declaration of attached text (or say, rect text) are changed.
- It effects these places:
- In the
graphiccomponents: the declarations of each element. [compat, but not accurately the same in some complicated cases.] - In
custom series: the declarations of each element in the return ofrenderItem. [compat, but not accurately the same in some complicated cases]. - Directly use zrender graphic elements. [No compat, breaking change].
- In the
- Changes:
- Chart instance
chart.one(...)is deprecated.
label:- In props
color,textBorderColor,backgroundColorandborderColor, the value'auto'is deprecated. Use the value'inherit'instead.
- In props
hoverAnimation:- option
series.hoverAnimationis deprecated. Useseries.emphasis.scaleinstead.
- option
line series:- option
series.clipOverflowis deprecated. Useseries.clipinstead.
- option
custom series:- In
renderItem, theapi.style(...)andapi.styleEmphasis(...)are deprecated. Because it is not really necessary and hard to ensure backward compatibility. Users can fetch system designated visual byapi.visual(...).
- In
sunburst series:- Action type
highlightis deprecated. UsesunburstHighlightinstead. - Action type
downplayis deprecated. UsesunburstUnhighlightinstead. - option
series.downplayis deprecated. Useseries.blurinstead. - option
series.highlightPolicyis deprecated. Useseries.emphasis.focusinstead.
- Action type
pie series:- The action type at the left part below are deprecated. Use the right part instead:
pieToggleSelect=>toggleSelectpieSelect=>selectpieUnSelect=>unselect
- The event type at the left part below are deprecated. Use the right part instead:
pieselectchanged=>selectchangedpieselected=>selectedpieunselected=>unselected
- option
series.label.marginis deprecated. Useseries.label.edgeDistanceinstead. - option
series.clockWiseis deprecated. Useseries.clockwiseinstead. - option
series.hoverOffsetis deprecated. Useseries.emphasis.scaleSizeinstead.
- The action type at the left part below are deprecated. Use the right part instead:
map series:- The action type at the left part below are deprecated. Use the right part instead:
mapToggleSelect=>toggleSelectmapSelect=>selectmapUnSelect=>unselect
- The event type at the left part below are deprecated. Use the right part instead:
mapselectchanged=>selectchangedmapselected=>selectedmapunselected=>unselected
- option
series.mapTypeis deprecated. Useseries.mapinstead. - option
series.mapLocationis deprecated.
- The action type at the left part below are deprecated. Use the right part instead:
graph series:- option
series.focusNodeAdjacencyis deprecated. Useseries.emphasis: { focus: 'adjacency'}instead.
- option
gauge series:- option
series.clockWiseis deprecated. Useseries.clockwiseinstead. - option
series.hoverOffsetis deprecated. Useseries.emphasis.scaleSizeinstead.
- option
dataZoom component:- option
dataZoom.handleIconneed prefixpath://if using SVGPath.
- option
radar:- option
radar.nameis deprecated. Useradar.axisNameinstead. - option
radar.nameGapis deprecated. Useradar.axisNameGapinstead.
- option
- Parse and format:
echarts.format.formatTimeis deprecated. Useecharts.time.formatinstead.echarts.number.parseDateis deprecated. Useecharts.time.parseinstead.echarts.format.getTextRectis deprecated.
- Transform related props of a graphic element are changed: