【发布时间】:2019-10-02 14:30:20
【问题描述】:
文档是here。任务是只显示某些点,而不是全部。
尝试:
<Chart
width="100%"
height="400px"
chartType="AreaChart"
legend_toggle
data={[
[
'Date',
...Object.keys(pieChart),
{ type: 'string', role: 'style' }
],
...estimates.map(item => {
return [
item.td,
...Object.keys(pieChart).map(country => item.countries.find(a => a.country == country) ? item.countries.find(a => a.country == country).value * 1 : undefined),
versions.find(version => {
return version.ts.substr(0, 10) == item.td
}) ? 'point { size: 18; shape-type: star; fill-color: #a52714; }' : null
]
})
]}
/>
看起来不错:
但样式永远不会应用,所有点都被隐藏了。有任何想法吗?
【问题讨论】:
标签: javascript reactjs charts google-visualization