MCPcopy Create free account
hub / github.com/apache/echarts / getItemVisualFromData

Function getItemVisualFromData

src/visual/helper.ts:30–46  ·  view source on GitHub ↗
(data: SeriesData, dataIndex: number, key: string)

Source from the content-addressed store, hash-verified

28
29
30export function getItemVisualFromData(data: SeriesData, dataIndex: number, key: string) {
31 switch (key) {
32 case 'color':
33 const style = data.getItemVisual(dataIndex, 'style');
34 return style[data.getVisual('drawType')];
35 case 'opacity':
36 return data.getItemVisual(dataIndex, 'style').opacity;
37 case 'symbol':
38 case 'symbolSize':
39 case 'liftZ':
40 return data.getItemVisual(dataIndex, key);
41 default:
42 if (__DEV__) {
43 console.warn(`Unknown visual type ${key}`);
44 }
45 }
46}
47
48export function getVisualFromData(data: SeriesData, key: string) {
49 switch (key) {

Callers 2

getVisualMethod · 0.90
getVisualFunction · 0.90

Calls 2

getVisualMethod · 0.65
getItemVisualMethod · 0.45

Tested by

no test coverage detected