ipecharts.option.visualmap module#

class ipecharts.option.visualmap.VisualMap(**kwargs: Any)[source]#

Bases: BaseWidget

Warning:

Autogenerated class

visualMap is a type of component for visual encoding, which maps the data to visual channels, including:

Multiple visualMap component could be defined in a chart instance, which enable that different dimensions of a series data are mapped to different visual channels.

visualMap could be defined as [Piecewise (visualMapPiecewise)](#visualMap-piecewise) or [Continuous (visualMapContinuous)](#visualMap-continuous), which is distinguished by the property type. For instance:

``` option = {

visualMap: [
{ // the first visualMap component

type: ‘continuous’, // defined to be continuous visualMap …

}, { // the second visualMap component

type: ‘piecewise’, // defined to be piecewise visualMap …

}

};

```

✦ Configure mapping ✦

The dimension of [series.data](#series.data) can be specified by [visualMap.dimension](#visualMap.dimension), from which the value can be retrieved and mapped onto visual channels, which can be defined in [visualMap.inRange](#visualMap.inRange) and [visualMap.outOfRange](#visualMap.outOfRange).

In series that controlled by visualMap, if a data item needs to escape from controlled by visualMap, you can set like this:

``` series: {

type: ‘…’, data: [

{name: ‘Shanghai’, value: 251}, {name: ‘Haikou’, value: 21}, // Mark as visualMap: false, then this item does not controlled by visualMap any more, // and series visual config (like color, symbol, …) can be used to this item. {name: ‘Beijing’, value: 821, }, …

]

}

```

✦ The relationship between visualMap of ECharts3 and dataRange of ECharts2 ✦

visualMap is renamed from the dataRange of ECharts2, and the scope of functionalities are extended a lot. The configurations of dataRange are still compatible in ECharts3, which automatically convert them to visualMap. It is recommended to use visualMap instead of dataRange in ECharts3.

✦ The detailed configurations of visualMap are elaborated as follows. ✦

visualMap List(None)#