You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/04/03 06:22:52 UTC
[incubator-echarts] branch next updated: fix(sunburst): optimize
default text color
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new 887dafa fix(sunburst): optimize default text color
887dafa is described below
commit 887dafa9f526b6f84058cc2b6e489c8b49ba0316
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Apr 3 14:22:22 2020 +0800
fix(sunburst): optimize default text color
---
src/chart/sankey/SankeyView.ts | 2 +-
src/chart/sunburst/SunburstPiece.ts | 26 +++++++++++++-------------
test/sankey.html | 1 -
3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/src/chart/sankey/SankeyView.ts b/src/chart/sankey/SankeyView.ts
index f102fcd..1d48089 100644
--- a/src/chart/sankey/SankeyView.ts
+++ b/src/chart/sankey/SankeyView.ts
@@ -402,7 +402,7 @@ class SankeyView extends ChartView {
}
});
- if (!this._data && seriesModel.get('animation')) {
+ if (!this._data && seriesModel.isAnimationEnabled()) {
group.setClipPath(createGridClipShape(group.getBoundingRect(), seriesModel, function () {
group.removeClipPath();
}));
diff --git a/src/chart/sunburst/SunburstPiece.ts b/src/chart/sunburst/SunburstPiece.ts
index 1095a6e..86bf38a 100644
--- a/src/chart/sunburst/SunburstPiece.ts
+++ b/src/chart/sunburst/SunburstPiece.ts
@@ -242,19 +242,6 @@ class SunburstPiece extends graphic.Group {
const sector = this.childAt(0);
const label = sector.getTextContent();
- graphic.setLabelStyle(
- label, normalModel, labelHoverModel,
- {
- defaultText: labelModel.getShallow('show') ? text : null,
- autoColor: visualColor
- }
- );
- sector.setTextConfig({
- inside: true,
- insideStroke: visualColor,
- insideFill: 'auto',
- outsideFill: visualColor
- });
const midAngle = (layout.startAngle + layout.endAngle) / 2;
const dx = Math.cos(midAngle);
@@ -287,6 +274,19 @@ class SunburstPiece extends graphic.Group {
}
}
+ graphic.setLabelStyle(
+ label, normalModel, labelHoverModel,
+ {
+ defaultText: labelModel.getShallow('show') ? text : null
+ }
+ );
+ sector.setTextConfig({
+ inside: labelPosition !== 'outside',
+ insideStroke: visualColor,
+ insideFill: 'auto',
+ outsideFill: visualColor
+ });
+
label.attr('style', {
text: text,
align: textAlign,
diff --git a/test/sankey.html b/test/sankey.html
index 2e438e6..5398424 100644
--- a/test/sankey.html
+++ b/test/sankey.html
@@ -67,7 +67,6 @@ under the License.
trigger: 'item',
triggerOn: 'mousemove'
},
- animation: false,
series: [
{
type: 'sankey',
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org