Please Help me With one SINGLE LINE of CODE

45 views
Skip to first unread message

John

unread,
Jun 8, 2016, 10:27:17 AM6/8/16
to Google Visualization API
All I would like to do is have a transparent background for the chart.. CLEAR..No Color. 

Here is the code...


<html>
  <head>
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      google.charts.load("current", {packages:["corechart"]});
      google.charts.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Task', 'Hours per Day'],
          ['Work',     11],
          ['Eat',      2],
          ['Commute',  2],
          ['Watch TV', 2],
          ['Sleep',    7]
        ]);

        var options = {
          title: 'My Daily Activities',
          pieHole: 0.91,
        };

        var chart = new google.visualization.PieChart(document.getElementById('donutchart'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="donutchart" style="width: 900px; height: 500px;"></div>
  </body>
</html>

THANK YOU

Daniel LaLiberte

unread,
Jun 8, 2016, 11:07:07 AM6/8/16
to Google Visualization API
Have you tried option backgroundColor: 'none' ?

--
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 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/4bd3b1fd-edf3-4cc6-8105-7a42761d4807%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

John

unread,
Jun 8, 2016, 11:44:22 AM6/8/16
to Google Visualization API
THANK YOU FOR RESPONDING DANIEL
 
Where would I input that line? 

John

unread,
Jun 8, 2016, 12:06:48 PM6/8/16
to Google Visualization API

are you able to guide me as to where I would place that line? 

- thanks.  

Daniel LaLiberte

unread,
Jun 8, 2016, 12:08:55 PM6/8/16
to Google Visualization API
How about in your options variable assignment? 

On Wed, Jun 8, 2016 at 12:06 PM, John <jfk....@gmail.com> wrote:

are you able to guide me as to where I would place that line? 

- thanks.  

--
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 https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

John

unread,
Jun 8, 2016, 12:13:05 PM6/8/16
to Google Visualization API
I LOVE YOU...haha THANKS BIG TIME!!
..where can I write a review? 

John

unread,
Jun 8, 2016, 7:07:12 PM6/8/16
to Google Visualization API
Hey Daniel... Would there be any reason why I am unable to place two separate graphs on the same page?

Daniel LaLiberte

unread,
Jun 8, 2016, 7:35:08 PM6/8/16
to Google Visualization API
If you try to run google.charts.load() more than once, it will complain.  If you try the 'upcoming' release (just replace 'current' with 'upcoming'), I've added support for calling google.charts.load() more than one time. 

You should be looking in your JavaScript console to find out what it is complaining about.

We have a documentation page on what you need to know about for drawing multiple charts on a single page.   https://developers.google.com/chart/interactive/docs/basic_multiple_charts



On Wed, Jun 8, 2016 at 7:07 PM, John <jfk....@gmail.com> wrote:
Hey Daniel... Would there be any reason why I am unable to place two separate graphs on the same page?

--
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 https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

John

unread,
Jun 8, 2016, 8:03:08 PM6/8/16
to Google Visualization API
YOU DID IT AGAIN HAHAHA...
THANK YOU SIR ! 
Reply all
Reply to author
Forward
0 new messages