diff --git a/src/chart/custom.js b/src/chart/custom.js index a409fd87505aefd58b39d62dae4937208dfa200a..c18b084d40c787f33896ca85adaa5600b23fd2d4 100644 --- a/src/chart/custom.js +++ b/src/chart/custom.js @@ -393,19 +393,17 @@ function makeRenderItem(customSeries, data, ecModel, api) { var itemStyle = currItemModel.getModel(ITEM_STYLE_EMPHASIS_PATH).getItemStyle(); - if (currLabelValueDim != null) { - graphicUtil.setTextStyle(itemStyle, currLabelEmphasisModel, null, { - isRectText: true - }, true); - - itemStyle.text = currLabelEmphasisModel.getShallow('show') - ? zrUtil.retrieve3( - customSeries.getFormattedLabel(dataIndexInside, 'emphasis'), - customSeries.getFormattedLabel(dataIndexInside, 'normal'), - data.get(currLabelValueDim, dataIndexInside) - ) - : null; - } + graphicUtil.setTextStyle(itemStyle, currLabelEmphasisModel, null, { + isRectText: true + }, true); + + itemStyle.text = currLabelEmphasisModel.getShallow('show') + ? zrUtil.retrieve3( + customSeries.getFormattedLabel(dataIndexInside, 'emphasis'), + customSeries.getFormattedLabel(dataIndexInside, 'normal'), + getDefaultLabel(data, dataIndexInside) + ) + : null; extra && zrUtil.extend(itemStyle, extra); return itemStyle;