Well, my understanding has increased and the question has changed.
The question is; when plotting 2 data series, how to get the graph to
scale and show the same series in the zoom area. When I have 2 data
series the graph determines the y axis gridlines based on the first
series but shows the second series in the zoom area. Hence, the
numbers for the second series y axis gridlines are not "pretty" ie.
they're forced to follow the grid selected for the first series.
Ideally, I want the graph to determine Y axis gridlines of the data
series shown in the zoom area.
Code:
var nmi_data = new google.visualization.DataTable();
var nmi_data_cols = 1;
nmi_data.addColumn('datetime', 'Date');
function nmi_data_create()
{
var recnt=0;
if (nmi_metar.length>0)
{
nmi_data_cols++
nmi_data.addColumn('number', 'degF');
nmi_data.addRows(nmi_metar.length);
for (x in nmi_metar)
{
nmi_metar[x][0]=new Date(nmi_metar[x][0]); //turn date str
into date obj
nmi_data.setValue(recnt,0,nmi_metar[x][0]);
nmi_data.setValue(recnt,1, Math.round((nmi_metar[x][1]
*9/5)+32));
recnt++
}
}
nmi_data.addColumn('number', "$unitsgraph");
nmi_data.addRows(nmi_param.length);
for (x in nmi_param)
{
nmi_param[x][0]=new Date(nmi_param[x][0]); // turn date str into
date obj
nmi_data.setValue(recnt,0,nmi_param[x][0]);
nmi_data.setValue(recnt,2, Math.round(nmi_param[x][1]));
recnt++
}
}
Options:
var colors = ['orange','green'];
nmi_chart.draw(nmi_data,
{
'displayZoomButtons': false,
'colors': colors.slice(colors.length - nmi_data_cols),
'scaleColumns': [0,1],
'scaleType': 'allmaximized',
'displayLegendDots': true,
//'scaleColumns': [0,3],
//'scaleType': 'allfixed',
'fill': 20,
'dummy':0 // help ensure we don't have an extra comma
});
Thanks,
On Dec 29, 4:10 am, VizGuy <[email protected]> wrote:
> It is not clear what you are trying to achieve.
> Could you please elaborate about what you want to see, and attach a bit more
> code lines to the snippets (if you can show some real example of your code,
> it will be very helpful).
>
> Regards,
> VizGuy
>
> On Tue, Dec 29, 2009 at 12:40 AM, jim <[email protected]> wrote:
> > I've got 2 series I want to plot using 2 independant Y scales. Can
> > this be done? Code as follows
>
> > 'scaleColumns': [1,0,],
> > 'min': [100,200],
> > 'scaleType': 'allfixed',
>
> > Thanks,
> > Jim
>
> > --
>
> > 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]<google-visualization-api%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-visualization-api?hl=en.
>
>
--
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.