如何将 curveType 选项应用于 google-chart 元素?
How to apply curveType option to google-chart element?
我正在尝试将 curveType 应用于 google-chart 元素以平滑线条,但出现以下错误:
Cannot read property 'toLowerCase' of undefined ×
这是我的代码:
<google-chart
type='line'
options='{
"title": "Days in a month",
"curveType": "function" // curveType: "function"
}'
cols='[{"label": "Month", "type": "string"},{"label": "Days", "type": "number"}]'
rows='[["Jan", 31],["Feb", 28],["Mar", 31],["Apr", 30],["May", 31],["Jun", 30]]'>
</google-chart>
如果这不是正确的方法,谁能告诉我如何弯曲聚合物 google-图表元素的线条?
弯曲线条参考:
https://developers.google.com/chart/interactive/docs/gallery/linechart?hl=en
标题是图表的一部分,不是一级选项。尝试:
<google-chart
type='line'
options='{
"chart": {
"title": "Days in a month"
},
"curveType": "function" // curveType: "function"
}'
cols='[{"label": "Month", "type": "string"},{"label": "Days", "type": "number"}]'
rows='[["Jan", 31],["Feb", 28],["Mar", 31],["Apr", 30],["May", 31],["Jun", 30]]'>
</google-chart>
我正在尝试将 curveType 应用于 google-chart 元素以平滑线条,但出现以下错误:
Cannot read property 'toLowerCase' of undefined ×
这是我的代码:
<google-chart
type='line'
options='{
"title": "Days in a month",
"curveType": "function" // curveType: "function"
}'
cols='[{"label": "Month", "type": "string"},{"label": "Days", "type": "number"}]'
rows='[["Jan", 31],["Feb", 28],["Mar", 31],["Apr", 30],["May", 31],["Jun", 30]]'>
</google-chart>
如果这不是正确的方法,谁能告诉我如何弯曲聚合物 google-图表元素的线条?
弯曲线条参考: https://developers.google.com/chart/interactive/docs/gallery/linechart?hl=en
标题是图表的一部分,不是一级选项。尝试:
<google-chart
type='line'
options='{
"chart": {
"title": "Days in a month"
},
"curveType": "function" // curveType: "function"
}'
cols='[{"label": "Month", "type": "string"},{"label": "Days", "type": "number"}]'
rows='[["Jan", 31],["Feb", 28],["Mar", 31],["Apr", 30],["May", 31],["Jun", 30]]'>
</google-chart>