You didn't make it clear if you looked at the 'Code it yourself on 
JSFiddle' link in the help file. 

Your rows aren't going in the data table because addRows is commented out. 
Studying the complete code given in the JSFiddle link should help. 

On Wednesday, March 22, 2023 at 11:16:05 AM UTC-5 André Esterhuizen wrote:

> This is what i tried but dont work 
>
> var data = new google.visualization.DataTable();
>       data.addColumn('date', 'Month');
>       data.addColumn('number', "Score -<?php echo $cyear;?>");
>       data.addColumn('date', 'Month');
>       data.addColumn('number', "Score -<?php echo $pyear;?>");
>      // data.addColumn('number', "Average Hours of Daylight");
>
>      // data.addRows([<?php echo 
> $admin->get_score_graph($data['data']['id']);?>]);
>
> [new Date(2014, 0),  -.5,new Date(2015, 0),  5.7],
>         [new Date(2014, 1),   .4,new Date(2015, 0),  8.7],
>         [new Date(2014, 2),   .5,new Date(2015, 0),   12],
>         [new Date(2014, 3),  2.9,new Date(2015, 0), 15.3],
>         [new Date(2014, 4),  6.3,new Date(2015, 0), 18.6],
>         [new Date(2014, 5),    9,new Date(2015, 0), 20.9],
>         [new Date(2014, 6), 10.6,new Date(2015, 0), 19.8],
>         [new Date(2014, 7), 10.3,new Date(2015, 0), 16.6],
>         [new Date(2014, 8),  7.4,new Date(2015, 0), 13.3],
>         [new Date(2014, 9),  4.4,new Date(2015, 0),  9.9],
>         [new Date(2014, 10), 1.1,new Date(2015, 0),  6.6],
>         [new Date(2014, 11), -.2,new Date(2015, 0),  4.5]
>
> On Wed, Mar 22, 2023 at 6:05 PM André Esterhuizen <
> aester...@raslouwskool.co.za> wrote:
>
>> Hi  Im using the Line chart and had look at this example
>>
>>
>> https://developers.google.com/chart/interactive/docs/gallery/linechart#dual-y-charts
>>
>> what I need to do is to make the x-axis the current year
>>
>> Y axis 0-300
>>
>>
>> I want to display current year with dates and marks in blue
>> Then the previous year date and mark in red
>>
>> The dates from current and previous year is about the same month but the 
>> actual date is diffrent
>>
>> Attached is a image i created in PAINt what i want to accomplish
>> Hope it helps
>>
>> Regards
>> Andre
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google Visualization API" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-visualizati...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-visualization-api/CAMZp5PYDE8fTVudQMz3fyX%3DJNij3k7f6HHUEWhqfzqdokCK%2BKg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/google-visualization-api/CAMZp5PYDE8fTVudQMz3fyX%3DJNij3k7f6HHUEWhqfzqdokCK%2BKg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/56274fa8-e107-4267-b1ae-eaf1ff8c5341n%40googlegroups.com.

Reply via email to