Perfect, that did the trick! Thanks for the help!
One small thing, I had to put quotes around the options (i.e. title, width,
height, etc.). Worked after that small change. Just wanted to add that in
case anyone ever came up on this answer.
Thanks again!
On Wednesday, September 5, 2012 4:54:35 PM UTC-7, asgallant wrote:
>
> You're options won't quite work as posted. Try this instead:
>
> var options = {
> title: 'Silver Bid or Ask - <?php echo $string_for_chart_date; ?>',
> width:680,
> height300,
> chartArea.left: '0px',
> theme: 'maximized',
> lineWidth:1,
> hAxis: {
> viewWindow: {
> min: new Date(<?php echo $year.",".($month+2).",".$day.
> ",07,15,0"; ?>),
> max: new Date(<?php echo $year.",".($month+1).",".$day.
> ",20,15,0"; ?>)
> },
> viewWindowMode: 'explicit'
> }
> };
>
> On Wednesday, September 5, 2012 4:26:22 PM UTC-4, Max wrote:
>>
>> I'm trying to make it so that my graph displays the remaining time in the
>> day (so it doesn't look like the market is closed). If my data points don't
>> run until the market close, I want the chart to be blank until that time.
>>
>> I've tried using the following options. Anything I'm missing?
>>
>> var data = new google.visualization.DataTable();
>> data.addColumn('datetime', 'Date');
>> data.addColumn('number', 'Bid');
>>
>> var dataView = new google.visualization.DataView(data);
>> dataView.setColumns([{calc: function(data, row) { return
>> data.getFormattedValue(row, 0); }, type:'datetime'}, 1]);
>> // Set chart options
>> var options = {'title':'Silver Bid or Ask - <?php echo
>> $string_for_chart_date; ?>',
>> 'width':680,
>> 'height':300,
>> 'chartArea.left': '0px',
>> 'theme': 'maximized',
>> 'lineWidth':1,
>> 'hAxis.maxValue': new Date(<?php echo
>> $year.",".($month+1).",".$day.",20,15,0"; ?>),
>> 'hAxis.minValue': new Date(<?php echo
>> $year.",".($month+2).",".$day.",07,15,0"; ?>),
>> 'hAxis.viewWindowMode': 'explicit'};
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/Jftb06ucXjQJ.
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.