* @param {module:echarts/data/List} data * @param {Object} payload * @param {string} state 'normal'|'emphasis'
(data, payload, state)
| 24811 | * @param {string} state 'normal'|'emphasis' |
| 24812 | */ |
| 24813 | function 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. |
| 24833 | enableClassExtend(Chart, ['dispose']); |
no test coverage detected