@@ -22,6 +22,7 @@ import { DataFormatMixin } from '../../model/mixin/dataFormat';
2222import { mixin } from 'zrender/src/core/util' ;
2323import SeriesData from '../../data/SeriesData' ;
2424import { inheritDefaultOption } from '../../util/component' ;
25+ import tokens from '../../visual/tokens' ;
2526
2627export interface SliderTimelineOption extends TimelineOption {
2728}
@@ -37,7 +38,7 @@ class SliderTimelineModel extends TimelineModel {
3738 static defaultOption : SliderTimelineOption = inheritDefaultOption ( TimelineModel . defaultOption , {
3839
3940 backgroundColor : 'rgba(0,0,0,0)' , // 时间轴背景颜色
40- borderColor : '#ccc' , // 时间轴边框颜色
41+ borderColor : tokens . color . border , // 时间轴边框颜色
4142 borderWidth : 0 , // 时间轴边框线宽,单位px,默认为0(无边框)
4243
4344 orient : 'horizontal' , // 'vertical'
@@ -53,7 +54,7 @@ class SliderTimelineModel extends TimelineModel {
5354 lineStyle : {
5455 show : true ,
5556 width : 2 ,
56- color : '#DAE1F5'
57+ color : tokens . color . accent10
5758 } ,
5859 label : { // 文本标签
5960 position : 'auto' , // auto left right top bottom
@@ -65,23 +66,23 @@ class SliderTimelineModel extends TimelineModel {
6566 rotate : 0 ,
6667 // formatter: null,
6768 // 其余属性默认使用全局文本样式,详见TEXTSTYLE
68- color : '#A4B1D7'
69+ color : tokens . color . tertiary
6970 } ,
7071 itemStyle : {
71- color : '#A4B1D7' ,
72- borderWidth : 1
72+ color : tokens . color . accent20 ,
73+ borderWidth : 0
7374 } ,
7475
7576 checkpointStyle : {
7677 symbol : 'circle' ,
7778 symbolSize : 15 ,
78- color : '#316bf3' ,
79- borderColor : '#fff' ,
80- borderWidth : 2 ,
81- shadowBlur : 2 ,
82- shadowOffsetX : 1 ,
83- shadowOffsetY : 1 ,
84- shadowColor : 'rgba(0, 0, 0, 0.3 )' ,
79+ color : tokens . color . accent50 ,
80+ borderColor : tokens . color . accent50 ,
81+ borderWidth : 0 ,
82+ shadowBlur : 0 ,
83+ shadowOffsetX : 0 ,
84+ shadowOffsetY : 0 ,
85+ shadowColor : 'rgba(0, 0, 0, 0)' ,
8586 // borderColor: 'rgba(194,53,49, 0.5)',
8687 animation : true ,
8788 animationDuration : 300 ,
@@ -99,47 +100,42 @@ class SliderTimelineModel extends TimelineModel {
99100
100101 position : 'left' , // 'left' 'right' 'top' 'bottom'
101102
102- playIcon : 'path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7, 14.1,44.9,3.3,31.6,3.3z M24.9, 21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z ' , // jshint ignore:line
103- stopIcon : 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z ' , // jshint ignore:line
103+ playIcon : 'path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z ' , // jshint ignore:line
104+ stopIcon : 'path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z ' , // jshint ignore:line
104105 // eslint-disable-next-line max-len
105- nextIcon : 'M2, 18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3, 18.08A1.5,1.5,0,0,1,2, 18.5Z ' , // jshint ignore:line
106+ nextIcon : 'path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z ' , // jshint ignore:line
106107 // eslint-disable-next-line max-len
107- prevIcon : 'M10,.5A1.52,1.52,0,0,1, 11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1, 10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z ' , // jshint ignore:line
108+ prevIcon : 'path:// M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z ' , // jshint ignore:line
108109
109110 prevBtnSize : 18 ,
110111 nextBtnSize : 18 ,
111112
112- color : '#A4B1D7' ,
113- borderColor : '#A4B1D7' ,
114- borderWidth : 1
113+ color : tokens . color . accent30 ,
114+ borderColor : tokens . color . accent30 ,
115+ borderWidth : 0
115116 } ,
116117 emphasis : {
117118 label : {
118119 show : true ,
119120 // 其余属性默认使用全局文本样式,详见TEXTSTYLE
120- color : '#6f778d'
121+ color : tokens . color . accent60
121122 } ,
122123
123124 itemStyle : {
124- color : '#316BF3'
125+ color : tokens . color . accent40
125126 } ,
126127
127128 controlStyle : {
128- color : '#316BF3' ,
129- borderColor : '#316BF3' ,
130- borderWidth : 2
129+ color : tokens . color . accent40
131130 }
132131 } ,
133132
134133 progress : {
135134 lineStyle : {
136- color : '#316BF3'
135+ color : tokens . color . accent20
137136 } ,
138137 itemStyle : {
139- color : '#316BF3'
140- } ,
141- label : {
142- color : '#6f778d'
138+ color : tokens . color . accent40
143139 }
144140 } ,
145141
0 commit comments