MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / toggleHighlight

Function toggleHighlight

libs/echarts/echarts.simple.js:24813–24830  ·  view source on GitHub ↗

* @param {module:echarts/data/List} data * @param {Object} payload * @param {string} state 'normal'|'emphasis'

(data, payload, state)

Source from the content-addressed store, hash-verified

24811 * @param {string} state 'normal'|'emphasis'
24812 */
24813function toggleHighlight(data, payload, state) {
24814 var dataIndex = queryDataIndex(data, payload);
24815
24816 var highlightDigit = (payload && payload.highlightKey != null)
24817 ? getHighlightDigit(payload.highlightKey)
24818 : null;
24819
24820 if (dataIndex != null) {
24821 each$1(normalizeToArray(dataIndex), function (dataIdx) {
24822 elSetState(data.getItemGraphicEl(dataIdx), state, highlightDigit);
24823 });
24824 }
24825 else {
24826 data.eachItemGraphicEl(function (el) {
24827 elSetState(el, state, highlightDigit);
24828 });
24829 }
24830}
24831
24832// Enable Chart.extend.
24833enableClassExtend(Chart, ['dispose']);

Callers 1

echarts.simple.jsFile · 0.70

Calls 5

queryDataIndexFunction · 0.70
getHighlightDigitFunction · 0.70
each$1Function · 0.70
normalizeToArrayFunction · 0.70
elSetStateFunction · 0.70

Tested by

no test coverage detected