1
Ich möchte hAxis Datumsformat im Bereichsfilter ändern. wenn ich beispielsweise Set-Format wie "dd-MMM-yyyygoogle chart hAxis Datumsformat im Bereich Filter Listener ändern
var chart = new google.visualization.ChartWrapper({
chartType: 'ComboChart',
dataTable: view,
options: {
hAxis: { format: 'dd-MM-yyyy'},
},
areaOpacity: 1.0
},
containerId: 'chart_div'
});
jetzt möchte ich, dass in Zuhörer, wenn Bereich mehr als ein Jahr ist dann Format des Diagramms wie Format ändern: 'MM-yyyy' usw. Verwendung von Ballow-Listener.
google.visualization.events.addListener(control, 'statechange', function (e) {
if (!e.inProgress) {
var difference_days = (control.getState().range.end - control.getState().range.start)/(1000 * 60 * 60 * 24);
if (difference_days >= 180){
//if more than six months then remove days from format
//hAxis: { format: 'MM-yyyy'},
}
}
});
Hoffnung neu gezeichnet werden .. . – WhiteHat