John,

I think a lot of what you are asking about is addressed at
https://developers.google.com/chart/interactive/docs/customizing_axes#Discrete_vs_Continuous

Yes, you can have the hAxis (also called the major axis) use a continuous
range of date values rather than the string labels for the years. As the
doc says:

In line, area, bar, column and candlestick charts (and combo charts
containing only such series), you can control the type of the major axis:
For a discrete axis, set the data column type to string.
For a continuous axis, set the data column type to one of: number, date,
datetime or timeofday.


You can simply change the strings for the years into numbers, and the
column chart will do what you want.  You can see this at:
http://jsfiddle.net/dlaliberte/rqppr/2/  It assumes you have just numbers,
but if you want dates, you can specify dates for the values using e.g. new
Date().  It appears you don't need to specify the type of the column, at
least if you use arrayToDataTable to construct your data table.

dan


On Thu, Oct 4, 2012 at 3:29 PM, John Eagle <john.a.ea...@gmail.com> wrote:

>         var data = google.visualization.arrayToDataTable([
>           ['Year', 'Sales', 'Expenses'],
>           ['2004',  1000,      400],
>           ['2005',  1170,      460],
>           ['2006',  660,       1120],
>               ['2007', 0,       0],
>               ['2008',  0,       0],
>               ['2009',  0,       0],
>           ['2010',  1030,      540]
>
> Can I have this without having zero place holders? i.e. is there an option
> that can do this? like format:'date' ?
>  var options = {
>           title: 'Company Performance',
>           hAxis: {title: 'Year', titleTextStyle: {color: 'red'}
>
> Thanks for any help... I am a newbie to google charts ;)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Chart API" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-chart-api/-/JfWC-kdrcXIJ.
> To post to this group, send email to google-chart-api@googlegroups.com.
> To unsubscribe from this group, send email to
> google-chart-api+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-chart-api?hl=en.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
dlalibe...@google.com <dlalibe...@google.com>   562D 5CC, Cambridge MA
daniel.lalibe...@gmail.com <daniel.lalibe...@gmail.com> 9 Juniper Ridge
Road, Acton MA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to google-chart-api@googlegroups.com.
To unsubscribe from this group, send email to 
google-chart-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en.

Reply via email to