Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug #9704 #10129

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/chart/sunburst/SunburstPiece.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ SunburstPieceProto._updateLabel = function (seriesModel, visualColor, state) {

var text = zrUtil.retrieve(
seriesModel.getFormattedLabel(
this.node.dataIndex, 'normal', null, null, 'label'
this.node.dataIndex, state, null, null, 'label'
),
this.node.name
);
Expand Down
2 changes: 1 addition & 1 deletion src/model/mixin/lineStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default {
var lineType = this.get('type');
var dotSize = Math.max(lineWidth, 2);
var dashSize = lineWidth * 4;
return (lineType === 'solid' || lineType == null) ? null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://github.com/ecomfe/zrender/blob/master/src/graphic/Path.js#L136
I think default value should better not be a [0, 0], but still null is better.

For this issue, probably we can always set a value to style.lineDash in method getLineStyle above whether line dash is null or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand! I just choose the simplest way, but don't know whether this way is the best!

return (lineType === 'solid' || lineType == null) ? [0, 0]
: (lineType === 'dashed' ? [dashSize, dashSize] : [dotSize, dotSize]);
}
};