Background Color on Annotation Charts

676 views
Skip to first unread message

mhjp

unread,
Mar 19, 2015, 11:57:25 AM3/19/15
to google-visua...@googlegroups.com
I cannot figure out how to change the background color on Annotation charts. Have tried:


chartArea: {backgroundColor: {fill: '#F0F0F0'}}

chartArea: {backgroundColor:'#F0F0F0'}

Neither works.

Thanks, Mike

Daniel LaLiberte

unread,
Mar 19, 2015, 2:21:57 PM3/19/15
to google-visua...@googlegroups.com
You'll want to use the undocumented 'chart' option, to specify options that apply to the chart component of the AnnotationChart.  And within the 'chart' option, there you can provide the 'chartArea' option.

var options = {
  backgroundColor: 'white', // for the area outside the chartArea
  chartArea: {
    backgroundColor: '#F0F0F0'
  }
}


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.



--
dlaliberte@Google.com   5CC, Cambridge MA
daniel.laliberte@GMail.com 9 Juniper Ridge Road, Acton MA

Daniel LaLiberte

unread,
Mar 19, 2015, 2:22:44 PM3/19/15
to google-visua...@googlegroups.com
Oops, I copied that wrong.  Should be this:

var options = {
  chart: {

mhjp

unread,
Mar 20, 2015, 12:16:47 AM3/20/15
to google-visua...@googlegroups.com
Perfect, thanks!


On Thursday, March 19, 2015 at 2:22:44 PM UTC-4, Daniel LaLiberte wrote:
Oops, I copied that wrong.  Should be this:

var options = {
  chart: {
    backgroundColor: 'white', // for the area outside the chartArea
    chartArea: {
      backgroundColor: '#F0F0F0'
    }
  }
}
On Thu, Mar 19, 2015 at 2:21 PM, Daniel LaLiberte <dlali...@google.com> wrote:
You'll want to use the undocumented 'chart' option, to specify options that apply to the chart component of the AnnotationChart.  And within the 'chart' option, there you can provide the 'chartArea' option.

var options = {
  backgroundColor: 'white', // for the area outside the chartArea
  chartArea: {
    backgroundColor: '#F0F0F0'
  }
}

On Thu, Mar 19, 2015 at 11:57 AM, mhjp <mhpal...@gmail.com> wrote:
I cannot figure out how to change the background color on Annotation charts. Have tried:


chartArea: {backgroundColor: {fill: '#F0F0F0'}}

chartArea: {backgroundColor:'#F0F0F0'}

Neither works.

Thanks, Mike

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.



--
dlali...@Google.com   5CC, Cambridge MA
daniel.l...@GMail.com 9 Juniper Ridge Road, Acton MA



--
dlali...@Google.com   5CC, Cambridge MA
daniel.l...@GMail.com 9 Juniper Ridge Road, Acton MA

Falgun Shah

unread,
Sep 27, 2016, 7:17:04 PM9/27/16
to Google Visualization API
I got the background to work, but the legand row is still white in color and also the legand text color is white  Is there any ways to fix this?

Ekaterina Dontsova

unread,
Nov 6, 2017, 8:22:22 PM11/6/17
to Google Visualization API
var chart = new google.visualization.AnnotationChart(document.getElementById('graph'));

#graph div{
background-color: @darkBlue;
}
Reply all
Reply to author
Forward
0 new messages