From 7159e0e3ff263cfe923814a0aa46027bde84554b Mon Sep 17 00:00:00 2001 From: sushuang Date: Thu, 11 Jan 2018 12:36:48 +0800 Subject: [PATCH] Fix label. --- src/chart/custom.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/chart/custom.js b/src/chart/custom.js index a409fd875..c18b084d4 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; -- GitLab