【发布时间】:2017-11-25 13:46:03
【问题描述】:
我有两个用于折线图的图表范围过滤器。
一个是日期,第二个是时间。
首先我想从日期范围过滤器中选择日期,然后我希望另一个图表范围滑块的值相对于第一个滑块发生变化。
或者如何设置图表范围过滤器的“hAxis”值?
提前致谢。
var controll = new google.visualization.ControlWrapper({
controlType: 'ChartRangeFilter',
containerId: 'control_div1',
options: {
filterColumnIndex: 0,
ui: {
chartOptions: {
height: 50,
labelStacking: 'vertical',
chartArea: {
width: '80%',
},
'hAxis': { 'baselineColor': 'none', format: "dd MMM yyyy" }
}
}
},
state: {
range: {
start: new Date(2017, 5, 8, 20, 00, 00, 00),
end: new Date(2017, 5, 8, 20, 50, 00, 00)
//state: { lowValue: new Date(2017, 5, 5, 20, 00, 00, 00),
// highValue: new Date(2017, 5, 13, 20, 50, 00, 00) }
}
}
});
第二个控制包装跟随时间变化
var control = new google.visualization.ControlWrapper({
controlType: 'ChartRangeFilter',
containerId: 'control_div',
options: {
filterColumnIndex: 0,
ui: {
chartOptions: {
height: 50,
chartArea: {
width: '80%',
},
'hAxis': { 'baselineColor': 'none', format: " hh:mm:ss" }
}
}
},
});
【问题讨论】:
标签: jquery charts google-visualization