MCPcopy
hub / github.com/apache/echarts / styleEmphasis

Function styleEmphasis

src/chart/custom/CustomView.ts:847–873  ·  view source on GitHub ↗

* @deprecated The reason see `api.style()` * @public * @param dataIndexInside by default `currDataIndexInside`.

(userProps?: ZRStyleProps, dataIndexInside?: number)

Source from the content-addressed store, hash-verified

845 * @param dataIndexInside by default `currDataIndexInside`.
846 */
847 function styleEmphasis(userProps?: ZRStyleProps, dataIndexInside?: number): ZRStyleProps {
848 if (__DEV__) {
849 warnDeprecated('api.styleEmphasis', 'Please write literal style directly instead.');
850 }
851
852 dataIndexInside == null && (dataIndexInside = currDataIndexInside);
853
854 let itemStyle = getItemStyleModel(dataIndexInside, EMPHASIS).getItemStyle();
855 const labelModel = getLabelModel(dataIndexInside, EMPHASIS);
856 const textStyle = labelStyleHelper.createTextStyle(labelModel, null, null, true, true);
857 textStyle.text = labelModel.getShallow('show')
858 ? retrieve3(
859 customSeries.getFormattedLabel(dataIndexInside, EMPHASIS),
860 customSeries.getFormattedLabel(dataIndexInside, NORMAL),
861 getDefaultLabel(data, dataIndexInside)
862 )
863 : null;
864 const textConfig = labelStyleHelper.createTextConfig(labelModel, null, true);
865
866 preFetchFromExtra(userProps, itemStyle);
867 itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig);
868
869 userProps && applyUserPropsAfter(itemStyle, userProps);
870 (itemStyle as LegacyStyleProps).legacy = true;
871
872 return itemStyle;
873 }
874
875 function applyUserPropsAfter(itemStyle: ZRStyleProps, extra: ZRStyleProps): void {
876 for (const key in extra) {

Callers

nothing calls this directly

Calls 10

warnDeprecatedFunction · 0.90
getDefaultLabelFunction · 0.90
getItemStyleModelFunction · 0.85
getLabelModelFunction · 0.85
preFetchFromExtraFunction · 0.85
applyUserPropsAfterFunction · 0.85
getItemStyleMethod · 0.80
getShallowMethod · 0.80
getFormattedLabelMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…