Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
半栈学徒
incubator-echarts
提交
1d72599c
I
incubator-echarts
项目概览
半栈学徒
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
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,发现更多精彩内容 >>
提交
1d72599c
编写于
12月 17, 2015
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Global text color
上级
e3b525e8
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
42 addition
and
28 deletion
+42
-28
src/chart/funnel/FunnelView.js
src/chart/funnel/FunnelView.js
+1
-1
src/chart/gauge/GaugeView.js
src/chart/gauge/GaugeView.js
+3
-3
src/chart/helper/Line.js
src/chart/helper/Line.js
+2
-2
src/chart/map/MapView.js
src/chart/map/MapView.js
+1
-1
src/chart/pie/PieView.js
src/chart/pie/PieView.js
+1
-1
src/chart/sankey/SankeyView.js
src/chart/sankey/SankeyView.js
+2
-2
src/chart/treemap/Breadcrumb.js
src/chart/treemap/Breadcrumb.js
+1
-1
src/chart/treemap/TreemapView.js
src/chart/treemap/TreemapView.js
+1
-1
src/component/axis/AngleAxisView.js
src/component/axis/AngleAxisView.js
+1
-1
src/component/axis/AxisBuilder.js
src/component/axis/AxisBuilder.js
+2
-2
src/component/dataRange/ContinuousView.js
src/component/dataRange/ContinuousView.js
+2
-2
src/component/dataRange/PiecewiseView.js
src/component/dataRange/PiecewiseView.js
+2
-2
src/component/dataZoom/SliderZoomView.js
src/component/dataZoom/SliderZoomView.js
+1
-1
src/component/helper/MapDraw.js
src/component/helper/MapDraw.js
+2
-2
src/component/legend/LegendView.js
src/component/legend/LegendView.js
+1
-1
src/component/title.js
src/component/title.js
+2
-2
src/component/tooltip.js
src/component/tooltip.js
+1
-1
src/component/tooltip/TooltipContent.js
src/component/tooltip/TooltipContent.js
+1
-1
src/model/mixin/textStyle.js
src/model/mixin/textStyle.js
+14
-0
src/util/graphic.js
src/util/graphic.js
+1
-1
未找到文件。
src/chart/funnel/FunnelView.js
浏览文件 @
1d72599c
...
...
@@ -178,7 +178,7 @@ define(function (require) {
||
labelPosition
===
'
inner
'
||
labelPosition
===
'
center
'
;
labelText
.
setStyle
({
// Default use item visual color
fill
:
textStyleModel
.
get
(
'
color
'
)
fill
:
textStyleModel
.
get
TextColor
(
)
||
isLabelInside
?
'
#fff
'
:
visualColor
,
text
:
seriesModel
.
getFormattedLabel
(
idx
,
'
normal
'
)
||
data
.
getName
(
idx
),
...
...
src/chart/gauge/GaugeView.js
浏览文件 @
1d72599c
...
...
@@ -204,7 +204,7 @@ define(function (require) {
text
:
label
,
x
:
unitX
*
(
r
-
splitLineLen
-
5
)
+
cx
,
y
:
unitY
*
(
r
-
splitLineLen
-
5
)
+
cy
,
fill
:
textStyleModel
.
get
(
'
color
'
),
fill
:
textStyleModel
.
get
TextColor
(
),
textFont
:
textStyleModel
.
getFont
(),
textBaseline
:
unitY
<
-
0.4
?
'
top
'
:
(
unitY
>
0.4
?
'
bottom
'
:
'
middle
'
),
textAlign
:
unitX
<
-
0.4
?
'
left
'
:
(
unitX
>
0.4
?
'
right
'
:
'
center
'
)
...
...
@@ -348,7 +348,7 @@ define(function (require) {
y
:
y
,
// FIXME First data name ?
text
:
seriesModel
.
getData
().
getName
(
0
),
fill
:
textStyleModel
.
get
(
'
color
'
),
fill
:
textStyleModel
.
get
TextColor
(
),
textFont
:
textStyleModel
.
getFont
(),
textAlign
:
'
center
'
,
textBaseline
:
'
middle
'
...
...
@@ -385,7 +385,7 @@ define(function (require) {
value
,
detailModel
.
get
(
'
formatter
'
)
),
fill
:
detailModel
.
get
(
'
backgroundColor
'
),
textFill
:
textStyleModel
.
get
(
'
color
'
),
textFill
:
textStyleModel
.
get
TextColor
(
),
textFont
:
textStyleModel
.
getFont
()
}
});
...
...
src/chart/helper/Line.js
浏览文件 @
1d72599c
...
...
@@ -243,14 +243,14 @@ define(function (require) {
?
seriesModel
.
getFormattedLabel
(
idx
,
'
normal
'
)
||
defaultText
:
''
,
textFont
:
textStyleModel
.
getFont
(),
fill
:
textStyleModel
.
get
(
'
color
'
)
||
lineData
.
getItemVisual
(
idx
,
'
color
'
)
fill
:
textStyleModel
.
get
TextColor
(
)
||
lineData
.
getItemVisual
(
idx
,
'
color
'
)
});
label
.
hoverStyle
=
{
text
:
labelHoverModel
.
get
(
'
show
'
)
?
seriesModel
.
getFormattedLabel
(
idx
,
'
emphasis
'
)
||
defaultText
:
''
,
textFont
:
textStyleModel
.
getFont
(),
fill
:
textStyleHoverModel
.
get
(
'
color
'
)
fill
:
textStyleHoverModel
.
get
TextColor
(
)
};
label
.
__textAlign
=
textStyleModel
.
get
(
'
align
'
);
label
.
__textBaseline
=
textStyleModel
.
get
(
'
baseline
'
);
...
...
src/chart/map/MapView.js
浏览文件 @
1d72599c
...
...
@@ -71,7 +71,7 @@ define(function (require) {
var
showLabel
=
labelModel
.
get
(
'
show
'
);
var
labelText
=
data
.
getName
(
idx
);
var
labelColor
=
textStyleModel
.
get
(
'
color
'
);
var
labelColor
=
textStyleModel
.
get
TextColor
(
);
var
labelFont
=
textStyleModel
.
getFont
();
var
circle
=
new
graphic
.
Circle
({
...
...
src/chart/pie/PieView.js
浏览文件 @
1d72599c
...
...
@@ -98,7 +98,7 @@ define(function (require) {
var
position
=
labelModel
.
get
(
'
position
'
);
var
isLabelInside
=
position
===
'
inside
'
||
position
===
'
inner
'
;
return
{
fill
:
textStyleModel
.
get
(
'
color
'
)
fill
:
textStyleModel
.
get
TextColor
(
)
||
isLabelInside
?
'
#fff
'
:
data
.
getItemVisual
(
idx
,
'
color
'
),
textFont
:
textStyleModel
.
getFont
(),
text
:
data
.
hostModel
.
getFormattedLabel
(
idx
,
state
)
...
...
src/chart/sankey/SankeyView.js
浏览文件 @
1d72599c
...
...
@@ -92,7 +92,7 @@ define(function (require) {
// Use empty string to hide the label
:
''
,
textFont
:
textStyleModel
.
getFont
(),
textFill
:
textStyleModel
.
get
(
'
color
'
),
textFill
:
textStyleModel
.
get
TextColor
(
),
textPosition
:
labelModel
.
get
(
'
position
'
)
}
});
...
...
@@ -111,7 +111,7 @@ define(function (require) {
?
seriesModel
.
getFormattedLabel
(
node
.
dataIndex
,
'
emphasis
'
)
||
node
.
id
:
''
,
textFont
:
textStyleHoverModel
.
getFont
(),
textFill
:
textStyleHoverModel
.
get
(
'
color
'
),
textFill
:
textStyleHoverModel
.
get
TextColor
(
),
textPosition
:
labelHoverModel
.
get
(
'
position
'
)
}
));
...
...
src/chart/treemap/Breadcrumb.js
浏览文件 @
1d72599c
...
...
@@ -123,7 +123,7 @@
{
lineJoin
:
'
bevel
'
,
text
:
text
,
textFill
:
textStyleModel
.
get
(
'
color
'
),
textFill
:
textStyleModel
.
get
TextColor
(
),
textAlign
:
'
left
'
,
textFont
:
textStyleModel
.
getFont
()
}
...
...
src/chart/treemap/TreemapView.js
浏览文件 @
1d72599c
...
...
@@ -323,7 +323,7 @@
fill
:
thisNode
.
getVisual
(
'
color
'
,
true
),
text
:
text
,
textPosition
:
labelModel
.
get
(
'
position
'
),
textFill
:
textStyleModel
.
get
(
'
color
'
),
textFill
:
textStyleModel
.
get
TextColor
(
),
textAlign
:
textStyleModel
.
get
(
'
align
'
),
textBaseline
:
textStyleModel
.
get
(
'
baseline
'
),
textFont
:
textStyleModel
.
getFont
()
...
...
src/component/axis/AngleAxisView.js
浏览文件 @
1d72599c
...
...
@@ -125,7 +125,7 @@ define(function (require) {
style
:
{
x
:
p
[
0
],
y
:
p
[
1
],
fill
:
textStyleModel
.
get
(
'
color
'
),
fill
:
textStyleModel
.
get
TextColor
(
),
text
:
labels
[
i
],
textAlign
:
labelTextAlign
,
textBaseline
:
labelTextBaseline
,
...
...
src/component/axis/AxisBuilder.js
浏览文件 @
1d72599c
...
...
@@ -233,7 +233,7 @@ define(function (require) {
textAlign
:
labelLayout
.
textAlign
,
textBaseline
:
labelLayout
.
textBaseline
,
textFont
:
itemTextStyleModel
.
getFont
(),
fill
:
itemTextStyleModel
.
get
(
'
color
'
)
fill
:
itemTextStyleModel
.
get
TextColor
(
)
},
position
:
pos
,
rotation
:
labelLayout
.
rotation
,
...
...
@@ -289,7 +289,7 @@ define(function (require) {
style
:
{
text
:
name
,
textFont
:
textStyleModel
.
getFont
(),
fill
:
textStyleModel
.
get
(
'
color
'
)
fill
:
textStyleModel
.
get
TextColor
(
)
||
axisModel
.
get
(
'
axisLine.lineStyle.color
'
),
textAlign
:
labelLayout
.
textAlign
,
textBaseline
:
labelLayout
.
textBaseline
...
...
src/component/dataRange/ContinuousView.js
浏览文件 @
1d72599c
...
...
@@ -139,7 +139,7 @@ define(function(require) {
textAlign
:
orient
===
'
horizontal
'
?
align
:
'
center
'
,
text
:
text
,
textFont
:
textStyleModel
.
getFont
(),
fill
:
textStyleModel
.
get
(
'
color
'
)
fill
:
textStyleModel
.
get
TextColor
(
)
}
}));
},
...
...
@@ -220,7 +220,7 @@ define(function(require) {
x
:
0
,
y
:
0
,
text
:
''
,
textBaseline
:
'
middle
'
,
textFont
:
textStyleModel
.
getFont
(),
fill
:
textStyleModel
.
get
(
'
color
'
)
fill
:
textStyleModel
.
get
TextColor
(
)
}
});
...
...
src/component/dataRange/PiecewiseView.js
浏览文件 @
1d72599c
...
...
@@ -25,7 +25,7 @@ define(function(require) {
var
textGap
=
dataRangeModel
.
get
(
'
textGap
'
);
var
textStyleModel
=
dataRangeModel
.
textStyleModel
;
var
textFont
=
textStyleModel
.
getFont
();
var
textFill
=
textStyleModel
.
get
(
'
color
'
);
var
textFill
=
textStyleModel
.
get
TextColor
(
);
var
itemAlign
=
this
.
getItemAlignByOrient
(
'
horizontal
'
,
ecWidth
);
var
itemSize
=
dataRangeModel
.
itemSize
;
...
...
@@ -88,7 +88,7 @@ define(function(require) {
textAlign
:
'
center
'
,
text
:
text
,
textFont
:
textStyleModel
.
getFont
(),
fill
:
textStyleModel
.
get
(
'
color
'
)
fill
:
textStyleModel
.
get
TextColor
(
)
}
}));
...
...
src/component/dataZoom/SliderZoomView.js
浏览文件 @
1d72599c
...
...
@@ -396,7 +396,7 @@ define(function (require) {
x
:
0
,
y
:
0
,
text
:
''
,
textBaseline
:
'
middle
'
,
textAlign
:
'
center
'
,
fill
:
textStyleModel
.
get
(
'
color
'
),
fill
:
textStyleModel
.
get
TextColor
(
),
textFont
:
textStyleModel
.
getFont
()
}
}));
...
...
src/component/helper/MapDraw.js
浏览文件 @
1d72599c
...
...
@@ -179,14 +179,14 @@ define(function (require) {
var
text
=
new
graphic
.
Text
({
style
:
{
text
:
showLabel
?
(
formattedStr
||
region
.
name
)
:
''
,
fill
:
textStyleModel
.
get
(
'
color
'
),
fill
:
textStyleModel
.
get
TextColor
(
),
textFont
:
textStyleModel
.
getFont
(),
textAlign
:
'
center
'
,
textBaseline
:
'
middle
'
},
hoverStyle
:
{
text
:
hoverShowLabel
?
(
hoverFormattedStr
||
region
.
name
)
:
''
,
fill
:
hoverTextStyleModel
.
get
(
'
color
'
),
fill
:
hoverTextStyleModel
.
get
TextColor
(
),
textFont
:
hoverTextStyleModel
.
getFont
()
},
position
:
region
.
center
.
slice
(),
...
...
src/component/legend/LegendView.js
浏览文件 @
1d72599c
...
...
@@ -236,7 +236,7 @@ define(function (require) {
text
:
name
,
x
:
textX
,
y
:
itemHeight
/
2
,
fill
:
textStyleModel
.
get
(
'
color
'
),
fill
:
textStyleModel
.
get
TextColor
(
),
textFont
:
textStyleModel
.
getFont
(),
textAlign
:
textAlign
,
textBaseline
:
'
middle
'
...
...
src/component/title.js
浏览文件 @
1d72599c
...
...
@@ -94,7 +94,7 @@ define(function(require) {
style
:
{
text
:
titleModel
.
get
(
'
text
'
),
textFont
:
textStyleModel
.
getFont
(),
fill
:
textStyleModel
.
get
(
'
color
'
),
fill
:
textStyleModel
.
get
TextColor
(
),
textBaseline
:
'
top
'
}
});
...
...
@@ -106,7 +106,7 @@ define(function(require) {
style
:
{
text
:
subText
,
textFont
:
subtextStyleModel
.
getFont
(),
fill
:
subtextStyleModel
.
get
(
'
color
'
),
fill
:
subtextStyleModel
.
get
TextColor
(
),
y
:
textRect
.
height
+
titleModel
.
get
(
'
itemGap
'
),
textBaseline
:
'
top
'
}
...
...
src/component/tooltip.js
浏览文件 @
1d72599c
...
...
@@ -636,7 +636,7 @@ define(function (require) {
});
text
.
setStyle
({
fill
:
textStyleModel
.
get
(
'
color
'
)
||
crossStyleModel
.
get
(
'
color
'
),
fill
:
textStyleModel
.
get
TextColor
(
)
||
crossStyleModel
.
get
(
'
color
'
),
textFont
:
textStyleModel
.
getFont
(),
text
:
value
.
join
(
'
,
'
),
x
:
point
[
0
]
+
5
,
...
...
src/component/tooltip/TooltipContent.js
浏览文件 @
1d72599c
...
...
@@ -37,7 +37,7 @@ define(function (require) {
var
cssText
=
[];
var
fontSize
=
textStyleModel
.
get
(
'
fontSize
'
);
var
color
=
textStyleModel
.
get
(
'
color
'
);
var
color
=
textStyleModel
.
get
TextColor
(
);
color
&&
cssText
.
push
(
'
color:
'
+
color
);
...
...
src/model/mixin/textStyle.js
浏览文件 @
1d72599c
...
...
@@ -7,6 +7,20 @@ define(function (require) {
}
return
{
/**
* Get color property or get color from option.textStyle.color
* @return {string}
*/
getTextColor
:
function
()
{
var
ecModel
=
this
.
ecModel
;
return
this
.
getShallow
(
'
color
'
)
||
(
ecModel
&&
ecModel
.
get
(
'
textStyle.color
'
));
},
/**
* Create font string from fontStyle, fontWeight, fontSize, fontFamily
* @return {string}
*/
getFont
:
function
()
{
var
ecModel
=
this
.
ecModel
;
var
gTextStyleModel
=
ecModel
&&
ecModel
.
getModel
(
'
textStyle
'
);
...
...
src/util/graphic.js
浏览文件 @
1d72599c
...
...
@@ -314,7 +314,7 @@ define(function(require) {
textDistance
:
labelModel
.
getShallow
(
'
distance
'
)
||
5
,
textFont
:
textStyleModel
.
getFont
(),
textPosition
:
labelPosition
,
textFill
:
textStyleModel
.
get
(
'
color
'
)
||
labelColor
textFill
:
textStyleModel
.
get
TextColor
(
)
||
labelColor
});
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录