Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
83df54fa
I
incubator-echarts
项目概览
x649585723
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
83df54fa
编写于
6月 23, 2020
作者:
P
pissang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(label): label color is dark by default in pie and sunburst.
上级
27c3cce8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
11 deletion
+15
-11
src/chart/pie/PieSeries.ts
src/chart/pie/PieSeries.ts
+1
-1
src/chart/pie/PieView.ts
src/chart/pie/PieView.ts
+8
-6
src/chart/sunburst/SunburstPiece.ts
src/chart/sunburst/SunburstPiece.ts
+1
-3
test/aria-pie.html
test/aria-pie.html
+1
-0
test/label-layout.html
test/label-layout.html
+1
-1
test/sunburst-drink.html
test/sunburst-drink.html
+3
-0
未找到文件。
src/chart/pie/PieSeries.ts
浏览文件 @
83df54fa
...
...
@@ -244,7 +244,7 @@ class PieSeriesModel extends SeriesModel<PieSeriesOption> {
height
:
null
,
label
:
{
color
:
'
inherit
'
,
//
color: 'inherit',
// If rotate around circle
rotate
:
0
,
show
:
true
,
...
...
src/chart/pie/PieView.ts
浏览文件 @
83df54fa
...
...
@@ -26,9 +26,10 @@ import GlobalModel from '../../model/Global';
import
ExtensionAPI
from
'
../../ExtensionAPI
'
;
import
{
Payload
,
ColorString
,
ECElement
}
from
'
../../util/types
'
;
import
List
from
'
../../data/List
'
;
import
PieSeriesModel
,
{
PieDataItemOption
}
from
'
./PieSeries
'
;
import
PieSeriesModel
,
{
PieDataItemOption
,
PieSeriesOption
}
from
'
./PieSeries
'
;
import
labelLayout
from
'
./labelLayout
'
;
import
{
setLabelLineStyle
}
from
'
../../label/labelGuideHelper
'
;
import
Model
from
'
../../model/Model
'
;
function
updateDataSelected
(
this
:
PiePiece
,
...
...
@@ -176,9 +177,9 @@ class PiePiece extends graphic.Sector {
const
visualColor
=
style
&&
style
.
fill
as
ColorString
;
graphic
.
setLabelStyle
(
labelText
,
labelModel
,
labelHoverModel
,
sector
,
labelModel
as
Model
<
Omit
<
PieSeriesOption
[
'
label
'
],
'
position
'
|
'
rotate
'
>>
,
// position / rotate won't be used.
labelHoverModel
as
Model
<
Omit
<
PieSeriesOption
[
'
label
'
],
'
position
'
|
'
rotate
'
>>
,
{
labelFetcher
:
data
.
hostModel
as
PieSeriesModel
,
labelDataIndex
:
idx
,
...
...
@@ -193,8 +194,9 @@ class PiePiece extends graphic.Sector {
// Set textConfig on sector.
sector
.
setTextConfig
({
local
:
true
,
outsideFill
:
labelModel
.
get
(
'
color
'
)
===
'
inherit
'
?
visualColor
:
'
auto
'
// reset position, rotation
position
:
null
,
rotation
:
null
});
// Make sure update style on labelText after setLabelStyle.
...
...
src/chart/sunburst/SunburstPiece.ts
浏览文件 @
83df54fa
...
...
@@ -231,11 +231,9 @@ class SunburstPiece extends graphic.Sector {
const
sectorState
=
isNormal
?
sector
:
sector
.
states
[
stateName
];
const
labelColor
=
sectorState
.
style
.
fill
as
ColorString
;
sectorState
.
textConfig
=
{
outsideFill
:
labelStateModel
.
get
(
'
color
'
)
===
'
inherit
'
?
labelColor
:
null
,
inside
:
labelPosition
!==
'
outside
'
};
if
(
labelColor
)
{
sectorState
.
textConfig
.
insideStroke
=
sectorState
.
textConfig
.
outsideFill
=
labelColor
;
}
let
r
;
const
labelPadding
=
getLabelAttr
(
labelStateModel
,
'
distance
'
)
||
0
;
...
...
test/aria-pie.html
浏览文件 @
83df54fa
...
...
@@ -98,6 +98,7 @@ under the License.
type
:
'
pie
'
,
radius
:
'
55%
'
,
center
:
[
'
50%
'
,
'
60%
'
],
selectedMode
:
'
single
'
,
data
:[
{
value
:
335
,
name
:
'
直接访问
'
},
{
value
:
310
,
name
:
'
邮件营销
'
},
...
...
test/label-layout.html
浏览文件 @
83df54fa
...
...
@@ -307,6 +307,7 @@ under the License.
type
:
'
pie
'
,
radius
:
[
'
50%
'
,
'
70%
'
],
label
:
{
color
:
'
inherit
'
,
show
:
false
},
emphasis
:
{
...
...
@@ -450,7 +451,6 @@ under the License.
formatter
:
function
(
param
)
{
return
param
.
data
[
3
];
},
color
:
'
#333
'
,
textBorderColor
:
'
#fff
'
,
textBorderWidth
:
1
,
position
:
'
top
'
...
...
test/sunburst-drink.html
浏览文件 @
83df54fa
...
...
@@ -713,6 +713,9 @@ under the License.
data
:
data
,
radius
:
[
0
,
'
95%
'
],
sort
:
null
,
label
:
{
color
:
'
inherit
'
},
levels
:
[{},
{
r0
:
'
15%
'
,
r
:
'
35%
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录