Hi again.
I did the changes according to your recommendations. but, still I can
not see the lable on the graph. The funny thing is that when I copy my
code into the Annotated Time Line Playground page , it renders
properly, but I can not see the labels on the graph when I publish my
website. Here comes the code snippet:
ata2.addRows(17);
data2.setValue(0, 0, new Date('10/22/2008'));
data2.setValue(0, 1, 0);
data2.setValue(1, 0, new Date('10/23/2008'));
data2.setValue(1, 1, 0);
data2.setValue(2, 0, new Date('10/24/2008'));
data2.setValue(2, 1, 0);
data2.setValue(3, 0, new Date('10/25/2008'));
data2.setValue(3, 1, 0);
data2.setValue(4, 0, new Date('10/26/2008'));
data2.setValue(4, 1, 0);
data2.setValue(5, 0, new Date('10/27/2008'));
data2.setValue(5, 1, 0);
data2.setValue(6, 0, new Date('10/28/2008'));
data2.setValue(6, 1, 0);
data2.setValue(7, 0, new Date('10/29/2008'));
data2.setValue(7, 1, 0);
data2.setValue(8, 0, new Date('10/30/2008'));
data2.setValue(8, 1, 0);
data2.setValue(9, 0, new Date('10/31/2008'));
data2.setValue(9, 1, 364);
data2.setValue(10, 0, new Date('11/01/2008'));
data2.setValue(10, 1, 640);
data2.setValue(11, 0, new Date('11/02/2008'));
data2.setValue(11, 1, 647);
data2.setValue(12, 0, new Date('11/03/2008'));
data2.setValue(12, 1, 9376);
data2.setValue(13, 0, new Date('11/04/2008'));
data2.setValue(13, 1, 14081);
data2.setValue(14, 0, new Date('11/05/2008'));
data2.setValue(14, 1, 13361);
data2.setValue(15, 0, new Date('11/06/2008'));
data2.setValue(15, 1, 21665);
data2.setValue(15, 2,'Maximum Events');
data2.setValue(15, 3, '21665');
data2.setValue(16, 0, new Date('11/07/2008'));
data2.setValue(16, 1, 2778);
var chart2 = new google.visualization.AnnotatedTimeLine
(document.getElementById('AnnotatedTimeLine'));
chart2.draw(data2, {'displayAnnotations': true});
What could be the reason?? Any help?
On Apr 21, 7:07 pm, VizGuy <[email protected]> wrote:
> Ah! Nothing is like a good code snippet!
> First, its not that you don't see labels, you don't see the chart at all!
>
> I copied your code into the Annotated Time Line Playground page
> (http://code.google.com/apis/ajax/playground/?type=visualization#annot...
> )
>
> There it is clear that there is just no data displayed at all. In the
> annotation that you can see, it can be seen that the date is NA.
> The date format you use is not a valid javascript date pattern to the Date
> constructor.
> Changing the dashes to slashes worked for me, and I can see the chart well,
> with the labels.
>
> Note: Please always look for js error. Preferred tool is FireBug extention
> of Firefox.
>
> Regards,
> VizGuy
>
> On Tue, Apr 21, 2009 at 12:04 PM, SaeedSS <[email protected]> wrote:
>
> > VizGuy;
> > I am working on a ASP.NET web application, that captures data from a
> > data cube and pass the data to Google Visualization to render the
> > graphs I need. The procedure that I use to retrieve data is somehow
> > complicated (as the data resides in a SQL Server Analysis Services
> > 2008 data cube), but the Javascript code that I create and write to my
> > ASP.NET page is like this (I must mention that I am not a web
> > developer, I am a BI developer, and there might be some thing that
> > doesn't look professional ;-) )
>
> > var data2 = new google.visualization.DataTable();
> > data2.addColumn('date', 'Date');
> > data2.addColumn('number', 'Event count');
> > data2.addColumn('string', 'title1');
> > data2.addColumn('string', 'text1');
> > data2.addRows(17);
> > data2.setValue(0, 0, new Date('10-22-2008'));
> > data2.setValue(0, 1, 0);
> > data2.setValue(1, 0, new Date('10-23-2008'));
> > data2.setValue(1, 1, 0);
> > data2.setValue(2, 0, new Date('10-24-2008'));
> > data2.setValue(2, 1, 0);
> > data2.setValue(3, 0, new Date('10-25-2008'));
> > data2.setValue(3, 1, 0);
> > data2.setValue(4, 0, new Date('10-26-2008'));
> > data2.setValue(4, 1, 0);
> > data2.setValue(5, 0, new Date('10-27-2008'));
> > data2.setValue(5, 1, 0);
> > data2.setValue(6, 0, new Date('10-28-2008'));
> > data2.setValue(6, 1, 0);
> > data2.setValue(7, 0, new Date('10-29-2008'));
> > data2.setValue(7, 1, 0);
> > data2.setValue(8, 0, new Date('10-30-2008'));
> > data2.setValue(8, 1, 0);
> > data2.setValue(9, 0, new Date('10-31-2008'));
> > data2.setValue(9, 1, 364);
> > data2.setValue(10, 0, new Date('11-01-2008'));
> > data2.setValue(10, 1, 640);
> > data2.setValue(11, 0, new Date('11-02-2008'));
> > data2.setValue(11, 1, 647);
> > data2.setValue(12, 0, new Date('11-03-2008'));
> > data2.setValue(12, 1, 9376);
> > data2.setValue(13, 0, new Date('11-04-2008'));
> > data2.setValue(13, 1, 14081);
> > data2.setValue(14, 0, new Date('11-05-2008'));
> > data2.setValue(14, 1, 13361);
> > data2.setValue(15, 0, new Date('11-06-2008'));
> > data2.setValue(15, 1, 21665);
> > data2.setValue(15, 2,'Maximum Events');
> > data2.setValue(15, 3, '21665');
> > data2.setValue(16, 0, new Date('11-07-2008'));
> > data2.setValue(16, 1, 2778);
> > var chart2 = new google.visualization.AnnotatedTimeLine
> > (document.getElementById('AnnotatedTimeLine'));
> > chart2.draw(data2, {'displayAnnotations': true});
>
> > As I mentioned earlier, I already published my page, and tried to open
> > it from another machine. but still I can not see the labels on the
> > Annotated TimeLine graph.
> > Any guidance would be highly appreciated.
> > 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]
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---