Charts 如何设置ui.chartType ;要在Google图表中为控件设置空值?
我正在使用带有图表范围过滤器控件的google图表。该控件附带一个默认图表(可通过更改ui.chartType进行修改)。我想删除默认图表。我想在控制图的选项中设置ui.chartType=None之类的内容。它只是给出了一个错误Charts 如何设置ui.chartType ;要在Google图表中为控件设置空值?,charts,google-visualization,Charts,Google Visualization,我正在使用带有图表范围过滤器控件的google图表。该控件附带一个默认图表(可通过更改ui.chartType进行修改)。我想删除默认图表。我想在控制图的选项中设置ui.chartType=None之类的内容。它只是给出了一个错误 var control = new google.visualization.ControlWrapper({ 'controlType': 'ChartRangeFilter', 'containerId': 'chartRangeFilte
var control = new google.visualization.ControlWrapper({
'controlType': 'ChartRangeFilter',
'containerId': 'chartRangeFilter_control_div1',
'options': {
'filterColumnIndex': 0,
'ui': {
'chartType': 'LineChart',
'chartOptions': {
'chartArea': {'width': '90%'},
'hAxis': {'baselineColor': 'none'}
},
// Display a single series that shows the closing value of the stock.
// Thus, this view has two columns: the date (axis) and the stock value (line series).
'chartView': {
'columns': [0, 3]
},
// 1 day in milliseconds = 24 * 60 * 60 * 1000 = 86,400,000
'minRangeSize': 86400000
}
},
'state': {'range': {'start': new Date(2012, 1, 9), 'end': new Date(2012, 2, 20)}}
});
感谢您的帮助。您应该能够使用
setOption
方法
control.setOption('ui.chartType', null);
但是,我认为需要某种类型的图表…您应该能够使用
setOption
方法
control.setOption('ui.chartType', null);
然而,我认为需要某种类型的图表…目前为止运气不好。使用上述方法具体会发生什么?您是否收到错误?我将折线图替换为null。没有变化。到目前为止没有运气。使用上述方法具体会发生什么?您是否收到错误?我将折线图替换为null。没有变化。