Hi Mark,

As documented on our BarChart documentation page
<https://developers.google.com/chart/interactive/docs/gallery/barchart>, in
order to use the Material Bar chart with the old options (which is the only
documented way of using it at the moment), you have to call
google.charts.Bar.convertOptions on your options structure.

Here is a working jsfiddle of your example: http://jsfiddle.net/secb0bk3/

On Mon, Feb 15, 2016 at 9:32 AM Mark Lankhorst <lankhorst.m...@gmail.com>
wrote:

> Hi all,
>
> I'm working with the Google charts for a few days, but the backgroundColor
> fill option is not working in my chart.
>
> The code i'm using:
>
> <script type="text/javascript">
> // Load the Visualization API and the chart packages.
> google.charts.load('current', {'packages': ['gauge', 'bar'], 'language':
> 'nl'});
> // Set a callback to run when the Google Visualization API is loaded.
> google.charts.setOnLoadCallback(drawChart);
> // Callback that creates and populates a data table,
> // instantiates the charts, passes in the data and
> // draws them.
> function drawChart() {
>     // Create the data table.
>     var BarData = new google.visualization.arrayToDataTable([
>           ['', 'Kosten', 'Target', 'Opbrengst'],
>           [' ', 1, 2, 3]
>
>     ]);
>  var BarOptions = {
>           bars: 'vertical',
>           vAxis: {format: 'currency'},
>           height: 150,
>           width: 340,
>           backgroundColor: {fill: 'none'},
>           colors: ['#3265cb', '#109617', '#e9573f']
>     };
>     var BarChart = new google.charts.Bar(document.getElementById(
>         'bar_chart'));
>     BarChart.draw(BarData, BarOptions);
>     };
> </script>
>
> Hope someone can help me.
>
> Mark
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> Visit this group at
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/304d80f6-e821-4225-8955-bec556c32812%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/304d80f6-e821-4225-8955-bec556c32812%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

*[image: unnamed.gif]• Sergey Grabkovsky• Software Engineer• Google, Inc•
gra...@google.com <gra...@google.com>*

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAEwwup4-Lco9V1m6E6reX-Qah15Aa4iKBAYcKtjwn5sKcQe98w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to