Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to add column with a legend in doughnut chart
    primarykey
    data
    text
    <p>Hi I have taken a reference of doughnut chart from google api and all working fine. </p> <p>But i have two queries:</p> <p>a. How to add one more column for the values with the legend as shown in image</p> <p><img src="https://i.stack.imgur.com/0pPlo.png" alt="enter image description here"></p> <p>b. When focus on specific field how the increase the size of image as shown in image.</p> <p><img src="https://i.stack.imgur.com/qDIGO.png" alt="enter image description here"></p> <p>here is the code</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Total Expenses in percentage'], ['Home Loan', 28], ['Rent', 23], ['Other EMI', 11], ['Utilities', 7], ['Childrens Education', 6], ['Recreation', 25] ]); var options = { title: 'Total Annual Expenses', colors:['#CCCCCC','#D95B43','#C02942','#542437','#53777A','#ECD078'], pieHole: 0.5, pieSliceText: 'Annual Expenses', pieSliceTextStyle: {color: 'Annual Expenses', fontName: 'Century Gothic', fontSize: 14} }; var chart = new google.visualization.PieChart(document.getElementById('donutchart')); chart.draw(data, options); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt; &lt;div id="donutchart" style="width: 700px; height: 400px;"&gt;&lt;/div&gt; &lt;div id="pieholetext" style="position:relative; width: 50px; height: 30px; margin-top: 20px; bottom:235px; left:230px;"&gt;Annual Expenses&lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and a reference link is <a href="https://google-developers.appspot.com/chart/interactive/docs/gallery/piechart#Overview" rel="nofollow noreferrer">reference</a></p> <p>Please suggest how to do it. </p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload