I don't believe any of the things you want are possible with the ATL
charts. Regular line charts allow you to use a log scale and/or reverse
the vertical axis direction (which is what I assume you mean by "reverse
scale"), and, with some hackery, they probably can be made to change the
legend depending on which line you are hovering over. With the annotation
column role and the new ChartRangeFilters, *most* of the ATL functionality
is available to LineCharts.
On Tuesday, February 28, 2012 3:48:35 AM UTC-5, Jojo1309 wrote:
>
> Hi,
>
> I'm using Visualization API, and specially, the annotatedtimeline graph.
>
> I want to do several things:
>
> - First, in the legend, I want to display only the legends of the curves
> currently on the mouse position. For example, in the sample code I provide,
> when the mouse is on the red curve, I don't want to see the blue legend. I
> didn't find how to to this.
>
> - I also want to display log scale
>
> - And then, is it possible to display reverse scales?
>
> Thanks for any help
>
> Johann
>
> function drawVisualization()
>
> {
>
> var data = new google.visualization.DataTable();
>
>
> data.addColumn('datetime', 'Heure');
>
> data.addColumn('number', 'Curve1');
>
> data.addColumn('number', 'Curve12');
>
>
> data.addRows(16);
>
> data.setValue(0, 0, new Date(2011, 7 ,22 ,1 ,0));
>
> data.setValue(0, 1, 0);
>
> data.setValue(1, 0, new Date(2011, 7 ,22 ,1 ,15));
>
> data.setValue(1, 1, 0);
>
> data.setValue(2, 0, new Date(2011, 7 ,22 ,1 ,30));
>
> data.setValue(2, 1, 0);
>
> data.setValue(3, 0, new Date(2011, 7 ,22 ,1 ,45));
>
> data.setValue(3, 1, 0);
>
> data.setValue(4, 0, new Date(2011, 7 ,22 ,4 ,15));
>
> data.setValue(4, 2, 0);
>
> data.setValue(5, 0, new Date(2011, 7 ,22 ,4 ,30));
>
> data.setValue(5, 2, 10);
>
> data.setValue(6, 0, new Date(2011, 7 ,22 ,4 ,45));
>
> data.setValue(6, 2, 100);
>
> data.setValue(7, 0, new Date(2011, 7 ,22 ,5 ,0));
>
> data.setValue(7, 2, 10000);
>
> data.setValue(8, 0, new Date(2011, 7 ,22 ,5 ,15));
>
> data.setValue(8, 2, 10);
>
> data.setValue(9, 0, new Date(2011, 7 ,22 ,5 ,30));
>
> data.setValue(9, 2, 15);
>
> data.setValue(10, 0, new Date(2011, 7 ,22 ,5 ,45));
>
> data.setValue(10, 2, 20);
>
> data.setValue(11, 0, new Date(2011, 7 ,22 ,6 ,0));
>
> data.setValue(11, 2, 18);
>
> data.setValue(12, 0, new Date(2011, 7 ,22 ,6 ,15));
>
> data.setValue(12, 2, 0);
>
> data.setValue(13, 0, new Date(2011, 7 ,22 ,6 ,30));
>
> data.setValue(13, 2, 0);
>
> data.setValue(14, 0, new Date(2011, 7 ,22 ,6 ,45));
>
> data.setValue(14, 2, 0);
>
> data.setValue(15, 0, new Date(2011, 7 ,22 ,7 ,0));
>
> data.setValue(15, 2, 0);
>
>
> Here's my sample code:
>
> var formatter_short = new google.visualization.DateFormat({pattern:
> 'dd/MM/yyyy HH:mm'});
>
> formatter_short.format(data, 0);
>
>
> var timeline = new
> google.visualization.AnnotatedTimeLine(document.getElementById('visualization'));
>
> timeline.draw(data, {
>
> 'displayAnnotationsFilter': true,
>
> 'displayExactValues': false,
>
> 'dateFormat' : 'dd MMMM yyyy HH:mm:ss',
>
> 'legendPosition': 'newRow',
>
> 'displayRangeSelector' : false,
>
> 'displayZoomButtons': false,
>
> 'fill' : 30,
>
> legend:'bottom'
>
> });
>
> }
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/QvCkya8FgLQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.