You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
进度条 - Progress
进度条用于展示数据、业绩等实际值与目标值的比例、当前进度及完成情况。由三部分组成:目标值部分、实际值部分、统计文字部分。
开始使用
选项
由上述可知,进度条由三个部分组合而成:前景mark、背景 mark、文字mark,为了区分设置不同 mark 属性,通过「属性前缀」来实现,即:
fore
fore
text
1.
{ percent: 0.75}
2.
{ current: 100, target: 400 }
true
环形、false
条形fore
、back
、text
指定样式由上述可知,进度条由三个部分组合而成:内部图形 mark、外部图形 mark,文字mark,为了区分不同 mark 属性,通过「属性前缀」来实现,即:
常见样式配置如下:
foreFill
#D0D0D0
backFill
#30BF78
textFill
#888
textContent
(current, target): string => {}
orstring
scale#color
chart.scale({color: { domain: [100, 250, 300], range: ['#F4664A', '#FAAD14', 'green'],},})
foreAnimate
backAnimate
textAnimate
其他属性透传,对三个mark 都生效。
案例
条形-自定义图形区间颜色
环形-自定义文字
环形-自定义外层图形
Beta Was this translation helpful? Give feedback.
All reactions