[visualization-api] Line Chart Image Background or Watermark

1,044 views
Skip to first unread message

Burton

unread,
May 4, 2010, 2:54:56 PM5/4/10
to Google Visualization API
Is it possible to have a background image or watermark for a google
visualization? I know you can specify the color, but I want an image.

Thanks,
Andrew

--
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.

MC Get Vizzy

unread,
May 10, 2010, 7:52:31 AM5/10/10
to google-visua...@googlegroups.com
hi Andrew.  this is currently not supported.

Arunabh Das

unread,
Jun 2, 2010, 5:54:17 PM6/2/10
to Google Visualization API
How do you specify the background color for piechart?

On May 10, 7:52 am, MC Get Vizzy <getvi...@google.com> wrote:
> hi Andrew.  this is currently not supported.
>
>
>
> On Tue, May 4, 2010 at 9:54 PM, Burton <abur...@enki.us> wrote:
> > Is it possible to have a background image or watermark for a google
> > visualization? I know you can specify the color, but I want an image.
>
> > Thanks,
> > Andrew
>
> > --
> > 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<google-visualization-api%2Bunsu...@googlegroups.com>
> > .

Arunabh Das

unread,
Jun 2, 2010, 5:59:59 PM6/2/10
to Google Visualization API
Nevermind, I just realized I can use the backgroundColor property.

On May 10, 7:52 am, MC Get Vizzy <getvi...@google.com> wrote:
> hi Andrew.  this is currently not supported.
>
>
>
> On Tue, May 4, 2010 at 9:54 PM, Burton <abur...@enki.us> wrote:
> > Is it possible to have a background image or watermark for a google
> > visualization? I know you can specify the color, but I want an image.
>
> > Thanks,
> > Andrew
>
> > --
> > 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<google-visualization-api%2Bunsu...@googlegroups.com>
> > .

Séb

unread,
Nov 29, 2011, 2:18:24 PM11/29/11
to google-visua...@googlegroups.com
Hi,

The only way I found to display a background image, is with CSS opacity, I share it :

HTML

 <div class="bg">
    <div id="chart_div" class="chart"></div>
 </div>

CSS

.bg {background:url(yourPic.png);}
.chart {opacity : 0.8; 
    -moz-opacity : 0.8; 
    -ms-filter: "alpha(opacity=80)"; /* IE 8 */ 
    filter : alpha(opacity=80); /* IE < 8 */}
 

Roni Biran

unread,
Nov 30, 2011, 3:59:45 AM11/30/11
to google-visua...@googlegroups.com
nice, however this is a faded image :-(

you can just set the backgroundColor of the chart to transparent and add the image in the style of the div

for example:

<script>
.......
chart.draw(data, { ......, backgroundColor: 'transparent' });
......
</script>

<div id="chart" style="width:500px;height:400px;background-image:url('imgSrc.png');"></div>



--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.

asgallant

unread,
Nov 30, 2011, 3:35:12 PM11/30/11
to google-visua...@googlegroups.com
Note that transparency does not work in the IE version of the charts (the charts use VML instead of SVG in IE, and the chart team couldn't get transparency working without breaking everything else).
Reply all
Reply to author
Forward
0 new messages