Visual mapping is a concept of using data to alter the visualization elements of a chart such as color, size and symbol.
Below is a scatter plot of palmer penguins with color specified by the species.
Stacked bar & color by
colorBy alone may not be sufficient. For example, creating a stacked bar but partitioning the
bar further based on another dimension and coloring each partition is achieved by partitioning and coloring.
Till 5.2.2 ECharts supported the ability to create a stacked bar by applying visual color on a dimension other than the category dimension used for the bar chart (see issue 16459).
Below is a scatter plot of palmer penguins with symbol specified by the species.
Category Data Series
Below is a scatter plot of palmer penguins with symbol size specified by the species.
Value Data Series
Note that the data series used for sizeBy can be either a category data series or a value data series. A value data series will result in a linear interpolation of the symbol size.
It is possible to specify global color palette for all the charts using the following API.
colors argument is an array of html colors.
// for multiple colors
// for single color but gradient, say for heat maps
// single color