如何解决如何使用 Google 图表更改时间线的背景颜色?
目前,我在使用 Google 图表创建的时间线中有一个交替的背景颜色。这是图表组件:
return (
<div class="row" style={{ marginBottom: 30,zoom: "75%" }}>
<Chart
width={'100%'}
height={'200px'}
chartType="Timeline"
loader={<div>Loading Chart</div>}
columns={
[
{ type: 'string',id: 'Position' },{ type: 'string',id: 'Name' },{ type: 'date',id: 'Start' },id: 'End' },]
}
rows={
timelineData.map((data,idx) => (
[
data.type,data.name,new Date(data.ysD,data.msD,data.dsD),new Date(data.yeD,data.meD,data.deD)
]
))
}
options={{
timeline: {
colorByRowLabel: true,},backgroundColor: {
fill: 'white'
}
}}
rootProps={{ 'data-testid': '3' }}
/>
</div>
)
这是它的样子:
我想删除交替的灰色,只想保留每一行的白色。有没有办法在 React 中做到这一点?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。