This known issue, alongside some others,  will be fixed in the next release
  Badtnik

On Wed, May 26, 2010 at 6:34 PM, Jim <[email protected]> wrote:

>
> Hi Frank,
>
> The new corechart package seems to have a few "features". I have been
> using the columnchart package for a while with date series data. I've
> just tried the new corechart package and it doesn't work with date
> series data :-(
>
> I get the same error: "inconsistent data type accross (sic) series on
> vertical axis", and the new documentation states that the first column
> should be a string.
>
> Try it with the old columnchart package and you should be good to go:
> google.load("visualization", "1", {packages:["columnchart"]});
>
> Either we need an enhancement to get this functionality back, or do a
> date to string conversion...
>
> Cheers,
> Jim
>
> On May 22, 3:23 pm, FrankP <[email protected]> wrote:
> > I am having issues with creating a column chart with a datetime
> > access. The data is coming in via XML and being converted to a
> > javascript date. The date object is valid in the js code and the code
> > has no errors. The dates in the XML are also sequential hourly values
> > spanning a 25 hour period.
> >
> > I have tried a couple date formats in the XML and both convert to
> > valid date objects. Here are the I currently have in the XML: <dt>Fri
> > May 21 2010 11:00:00 PM</dt> or <dtb>May 21, 2010 23:00:00</dtb>
> >
> > The column chart builds fine when the datetime is a string so I am
> > certain it is an issue with the datetime. When I change the code to
> > use a datetime column and a date object I receive the following
> > error:  "inconsistent data type accross series on vertical axis"
> >
> > Here’s the code less the XML calls:
> >
> > var data = new google.visualization.DataTable();
> >         data.addColumn('datetime', 'Hour');
> >         data.addColumn('number','Watts/SF');
> >         data.addRows(x.length);
> > /* XML call's removed */
> >         for(i=0;i<x.length;i++)  {
> >
> //dt=x[i].getElementsByTagName("dt")[0].firstChild.nodeValue;
> >                 var dt =
> x[i].getElementsByTagName("dt")[0].firstChild.nodeValue;
> >                 alert(dt);
> >                 data.setValue(i,0, new Date(dt));
> >                 var myVal = x[i].getElementsByTagName("value")
> > [0].firstChild.nodeValue;
> >
> >                 data.setValue(i,1,myVal*1);
> >         }
> >
> >         var chart = new
> > google.visualization.ColumnChart(document.getElementById('elChart'));
> >         chart.draw(data, {width: 1200, height: 750, title: 'Electric
> > Consumption', titleFontSize: 32,
> >                           hAxis: {title: 'Hour', titleColor:'red'}
> >                          });
> >
> > Any ideas or known issues with the datetime format? Thanks
> >
> > --
> > 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 athttp://
> 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]<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.

Reply via email to