formatted labels

17 views
Skip to first unread message

BenJWoodcroft

unread,
Oct 22, 2011, 7:13:17 PM10/22/11
to Google Visualization API
Hi,

I have a bar chart where the categories are names of (biological)
species, e.g. H. sapiens. By convention, these names are supposed to
be in italics. Is there any way to achieve this with chart tools? My
labels actually include a part that shouldn't be in italics, so I'm
after a label with HTML equivalent "<i>H. sapiens</i> (43)". Possible?

Thanks in advance.
ben

Roni Biran

unread,
Oct 23, 2011, 7:20:41 AM10/23/11
to google-visua...@googlegroups.com
As far as I know, there is no possibility to do that at the moment. However, you can recursively go to the relevant SVG element and set its style to italic. It is kind of a crooked solution, but it will work for now.




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


BenJWoodcroft

unread,
Oct 23, 2011, 6:08:00 PM10/23/11
to Google Visualization API
OK, thanks. Probably a dumb question, but how do I get the svg?

Roni Biran

unread,
Oct 24, 2011, 12:47:47 AM10/24/11
to google-visua...@googlegroups.com
The SVG are created in a web page appended to your div. All you have to do is go over the elements within the graph's div and find your tags


asgallant

unread,
Oct 24, 2011, 10:16:38 AM10/24/11
to google-visua...@googlegroups.com
I find the best way is to use jQuery to get the chart's iframe contents (I have posted about this here, here, and here as examples).  You'll have to study the structure of the SVG to figure out what you need to change.

BenJWoodcroft

unread,
Oct 27, 2011, 12:31:05 AM10/27/11
to Google Visualization API
OK, thanks for the help all. However, this all sounds a bit
complicated for my particular use case, so I don't think I'll bother,
and I'll use an entirely different solution.

On Oct 25, 1:16 am, asgallant <drew_gall...@abtassoc.com> wrote:
> I find the best way is to use jQuery to get the chart's iframe contents (I
> have posted about this here<https://groups.google.com/d/msg/google-visualization-api/22N0T30LY3k/...>,
> here<https://groups.google.com/d/msg/google-visualization-api/22N0T30LY3k/...>,
> and here<https://groups.google.com/d/msg/google-visualization-api/WifdoMOea9M/...>as examples).  You'll have to study the structure of the SVG to figure out
Reply all
Reply to author
Forward
0 new messages