Grid and Axis Colors

865 views
Skip to first unread message

Daniel

unread,
Sep 27, 2009, 8:29:52 PM9/27/09
to Google Chart API
I'm searching the options to change the axis and grid colors. I can
find options for changing the color of the axis labels, but not the
axis (or) grid lines itself.

Can somebody please point me the right way or name me the right
option?


Best regards
Daniel

Tom Maslen

unread,
Sep 28, 2009, 3:54:05 AM9/28/09
to google-c...@googlegroups.com
Hi Daniel,

I couldn't find an offical way of changing the axis line colours, but
someone suggested this hack to me:

Draw a range marker (this is just a line) over the grid using the colour
you want it to be. Here is an example:

http://bit.ly/mc63h

This is the pair used to draw the line: &chm=r,FFFFFF,0,-0.01,0.01,1

I've removed the axis line on the left by drawing a white line over it.

Range markers are documented here...

http://code.google.com/apis/chart/styles.html#range_markers

It took me a while to work out how the values work to position the line,
so if you get stuck I can offer more help.

Regards,
Tom.
www.tmaslen.plus.com
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

Tom Maslen

unread,
Sep 28, 2009, 4:26:58 AM9/28/09
to google-c...@googlegroups.com
Hello,

I've recently found out that if you have two data series on a chart with
a different number of values to each other, Google Charts will always
stretch out the smallest series to be the same length as the longest
one.

Is this behaviour expected? If so, is it possible for the smallest data
series not to be stretched?

I was looking around the documentation and can't really find anything
that answers my question. I did find this section...

http://code.google.com/apis/chart/formats.html#multiple_data_series

But without an example am unsure if this would help.

Could anyone give me am example of how this works:

chd=<encoding type><chart data series>:<chart data string>

Thanks,
Tom.
www.tmaslen.plus.com

KeithB

unread,
Sep 28, 2009, 9:46:18 AM9/28/09
to Google Chart API
In order to not stretch the smallest data set, you'll want to use null
or missing values (-1 for text encoding, _ for simple, __ for
extended). Given that the API supports null data points within a data
set I assume that this behaviour is by design.

Good luck,
K

Daniel

unread,
Sep 29, 2009, 6:35:54 AM9/29/09
to Google Chart API
Thanks for die idea Tom.

The thing with the range marker looks interesting, but it's still not
what
i've search for. I suppose that defining colors of axis and grid lines
isn't
fully supported by the chart api.

So Charts on black or Dark background is just kinda tricky and you
can only hope that the gray color of the axis and grid lines keep
readable.

Regards
Daniel
Reply all
Reply to author
Forward
0 new messages