Sorry, I cant try this out right now, but I don't think this works.
Although
you've set the color for column 1 as red, its values are not tied to
either
axis, so the data points don't correlate with the ticks on the axis.

Or are you saying there is something magic about setting the color,
which locks the data series together?

Steve

On Dec 22, 12:35 pm, VizGuy <[email protected]> wrote:
> Hi Steve,
>
> An axis is based on a single data series. This means that it will be in the
> same color used for the selected line.
> Yet - You can have more than one series referring to that axis.
> It will be a bit confusing, but the alternative is to have them both of the
> same color, which might be even more confusing (and actually can be done
> using the colors option, as in the code down here).
>
> You should also use 'allmaximize' or 'allfixed' value for the 'scaleType'
> option, as explained in the docs.
>
> Here is a variation of the code from the sample in the docs.
> Most of the changes are the data structure (added more data column and
> removed the annotations to emphasize the point here), and the options (in
> bold).
>
> Regards,
> VizGuy
>
> <html>
>   <head>
>     <script type='text/javascript' src='http://www.google.com/jsapi
> '></script>
>     <script type='text/javascript'>
>       google.load('visualization', '1', {'packages':['annotatedtimeline']});
>       google.setOnLoadCallback(drawChart);
>       function drawChart() {
>         var data = new google.visualization.DataTable();
>         data.addColumn('date', 'Date');
>         data.addColumn('number', 'Sold Pencils');
>         data.addColumn('number', 'Sold Pens');
>         data.addColumn('number', 'Sold paints');
>         data.addRows(6);
>         data.setValue(0, 0, new Date(2008, 1 ,1));
>         data.setValue(0, 1, 30000);
>         data.setValue(0, 2, 40645);
>         data.setValue(0, 3, 845);
>         data.setValue(1, 0, new Date(2008, 1 ,2));
>         data.setValue(1, 1, 14045);
>         data.setValue(1, 2, 20374);
>         data.setValue(1, 3, 274);
>         data.setValue(2, 0, new Date(2008, 1 ,3));
>         data.setValue(2, 1, 55022);
>         data.setValue(2, 2, 50766);
>         data.setValue(2, 3, 466);
>         data.setValue(3, 0, new Date(2008, 1 ,4));
>         data.setValue(3, 1, 75284);
>         data.setValue(3, 2, 14334);
>         data.setValue(3, 3, 434);
>         data.setValue(4, 0, new Date(2008, 1 ,5));
>         data.setValue(4, 1, 41476);
>         data.setValue(4, 2, 66467);
>         data.setValue(4, 3, 867);
>         data.setValue(5, 0, new Date(2008, 1 ,6));
>         data.setValue(5, 1, 33322);
>         data.setValue(5, 2, 39463);
>         data.setValue(5, 3, 363);
>
>         var chart = new
> google.visualization.AnnotatedTimeLine(document.getElementById('chart_div'));
>         *chart.draw(data, {scaleType: 'allfixed', scaleColumns: [0,2],
> colors:['red','red','blue']});*
>       }
>     </script>
>   </head>
>
>   <body>
>     <div id='chart_div' style='width: 700px; height: 240px;'></div>
>   </body>
> </html>
>
> On Thu, Dec 18, 2008 at 9:05 PM, stevep <[email protected]> wrote:
>
> > Another annotated graph timeline axis question.
>
> > I have a graph with 3 data series. I want two axes. One of the data
> > series should be plotted against one axss, and the other two data
> > series against the second axis.
>
> > Is this possible? It seems that you can't specify multiple data series
> > for a single axis.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to