Want to remove some parameter from pie charts

9 views
Skip to first unread message

Indresh Tayal

unread,
Dec 2, 2015, 6:42:37 AM12/2/15
to Google Visualization API
I have a script of pie chart to show the chart. I' am using it on my site page but there are some parameter is unwanted and i want to remove it
There are two dots i want to remove these dots i have used this script.

Please check the attached images

<html>
  <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Reviews', 'out of 5'],
          ['Positve',     3.7],
          ['Negative',    1.3]
        ]);

        var options = {
          pieHole: 0.8,
        };

        var chart = new google.visualization.PieChart(document.getElementById('donutchart'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="donutchart" style="width: 120px;"></div>
  </body>
</html>
screenshot-localhost 2015-12-02 17-08-12.png

Sergey Grabkovsky

unread,
Dec 2, 2015, 9:10:30 AM12/2/15
to Google Visualization API
Hi Indresh,

That's the legend. You can get rid of it by setting the 'legend' option to 'none', or to modify your example:
        var options = {
          pieHole: 0.8,
          legend: '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 http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/ca293231-cd98-4a35-aa13-4fc2aab6c2ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com

Reply all
Reply to author
Forward
0 new messages