* @deprecated The reason see `api.style()` * @public * @param dataIndexInside by default `currDataIndexInside`.
(userProps?: ZRStyleProps, dataIndexInside?: number)
| 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) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…