Labels

php (35) javascript (31) phpjavascript (30) jquery (23) html (20) mysql (14) database (9) codeigniter (4) json (4) bar chart (2) calendar (2) column chart (2) framework (2) google maps (2) query (2) tables (2) url (2) dropdown (1)

Wednesday, February 21, 2018

Everything about google pie chart

Its always a good idea to represent your data in a graphical way. here we are explaining how to use google graphs API.
<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'
        };

        var chart = new google.visualization.PieChart(document.getElementById('piechart'));

        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="piechart" style="width: 900px; height: 500px;"></div>
  </body>
</html>

Add these lines in your options variable

1. For 3D model pie chart.
is3D: true,

2. Adding background to pie chart
backgroundColor: 'skyblue',

3. Change legend text color and size
legendTextStyle: { color: 'red', fontSize: 15},

4. Change legend position
you can four different position options-top/bottom/left/right
legend:{ position:'bottom'},

5. Change title text color and size
titleTextStyle: { color: 'red', fontSize:16},

6. Change colors of pie slices
 colors: ['#e0440e', '#e6693e', '#ec8f6e', '#f3b49f', '#f6c7b6'],

7. Pie slice text display value and percentage
only for value.
 pieSliceText: 'value',

only for percentage
 pieSliceText: 'percentage',

for value and percentage
 pieSliceText: 'value-and-percentage',

8.Change pie slice(labels) text color and size
pieSliceTextStyle : {fontSize:16, color:'red'},
Result:



39 comments:

  1. It is always so hard to express how we feel and sometimes it is almost impossible to make others understand what we feel for them. The standards are often too high to attain. So many things to say, but not enough words. So, how do we create an atmosphere of pure emotion, love and affection? How do we send a message without actually saying too much? How do we reflect humility, tradition and respect without overstepping our bounds? These questions drive us every day.

    cheap flowers singapore
    best florist singapore
    cheap florist singapore
    flower arrangements online
    flower bouquet same day delivery
    flower delivery websites
    online floral delivery
    bridal hand bouquet singapore
    singapore florist delivery online
    flowers for floral arrangements
    Same day flower delivery singapore

    ReplyDelete
  2. Enter into norton setup with Norton setup product key. Sign in to download or setup. How to install Norton Security at norton setup Get Started.

    norton.com/setup
    www.norton.com/setup
    norton.com/setup
    norton setupnorton.com/setup

    norton.com/setup
    norton.com/setup
    norton setup
    www.norton.com/setup
    norton.com/setup


    ReplyDelete
  3. norton setup - Have you purchased a Norton security product recently? Find out how to download, install, setup Norton antivirus on your device.

    WWW.norton.com/setup

    norton.com/setup

    norton setup

    norton.com/NU16

    WWW.norton.com/NU16

    norton NU16

    norton account

    norton my account

    norton.com/myaccount

    ReplyDelete
  4. McAfee Complete McAfee Endpoint Protection is one of the many products of McAfee and the first choice for all businesses, depending on the sizes.


    mcafee.com/activate

    www.mcafee.com/activate

    mcafee activate

    mcafee.com/activate

    www.mcafee.com/activate

    ReplyDelete
  5. Install webroot antivirus with key code to remove threats without cd. if you want more info call our webroot install number.

    ReplyDelete
  6. To enable the protection for your Windows or Mac PC, all you need to do is download, install and activate the Norton Setup.

    norton setup - Have you purchased a Norton security product recently? Find out how to download, install, setup Norton antivirus on your device.

    WWW.norton.com/setup

    norton.com/setup

    norton setup

    norton.com/NU16

    WWW.norton.com/NU16

    norton NU16

    norton account

    norton my account

    norton.com/myaccount

    ReplyDelete

  7. One can buy Norton from retail store or online. Now Symantec has started distributing product activation keys in the form of retail card.

    norton.com/setup
    www.norton.com/setup
    norton com setup
    norton setup
    norton.com setup


    norton setup
    www.norton.com/setup
    norton.com/setup

    ReplyDelete
  8. MS Office setup at www.office.com/setup. Sign in with your Microsoft account or create one, enter your product key and install Office 365 or office 2016.

    ReplyDelete
  9. norton account offers you a fee-based suite of antivirus product that helps users to protect . it will protect your computer like avenger protect the

    earth from alien.

    WWW.norton.com/setup

    norton.com/setup

    norton setup

    norton.com/NU16

    WWW.norton.com/NU16

    norton NU16

    norton account

    norton my account

    norton.com/myaccount

    ReplyDelete
  10. Mcafee Activate: Are you facing the trouble to download, install and activate the McAfee product to the device? Follow the stepwise procedure detailed here for successfully activating the McAfee subscription using the redeemed McAfee Activation License Keycode.

    http://mcafee.coms-activate.me/

    ReplyDelete
  11. Call at Avast customer service number to get instant technical support for Avast antivirus. Resolve avast renewal problems, activation, billing problems etc.

    ReplyDelete
  12. Norton Setup is enhanced its versions to safeguard the information from any style of malware.

    norton.com/setup
    norton setup

    ReplyDelete
  13. Aol Mail is a free web-based email service provided by AOL, If you want Aol Login but you stuck log in don't worry we will help you and troubleshoot issues.

    ReplyDelete
  14. Need help for microsoft office setup? We can set-up, configure, & customize the suite as you want. office setup tech expert are 24*7 help you.

    Related Keywords:

    Office.com/setup
    www.office.com/setup
    office setup

    ReplyDelete
  15. McAfee Complete McAfee Endpoint Protection is one of the many products of McAfee and the first choice for all businesses, depending on the sizes.

    mcafee activate

    ReplyDelete

  16. Norton.com/Setup - Guide how to download, install, and activate www.norton.com/setup on your device. Also get complete information about Norton antivirus.

    norton.com/setup
    norton setup

    ReplyDelete
  17. Norton.com/setup - Norton offers highly-advanced security solutions and antivirus range to the computer users across the world.

    norton.com/setup

    norton.com/NU16

    ReplyDelete
  18. 24/7 technical support for Install Webroot antivirus, call us to get instant support on Webroot Install issues. if you face any problem Dial Webroot toll free number.

    ReplyDelete
  19. Are you face any problem regarding AOL Mail Account then you can easily contact our AOL Mail Support Service Number. Our technical support provide better facility by calling 24*7 service, to get resolved and hence to fix the errors at an immediate point.

    ReplyDelete
  20. norton.com/nu16- Step-by-step procedure for downloading, installing, and activating your Norton Setup antivirus successfully.

    norton.com/nu16

    ReplyDelete
  21. Office.com/setup – Download, install and activate Microsoft Office setup with 25 digit alpha-numeric product key code on www.office.com/setup.

    ReplyDelete
  22. Avast Bank Mode - In this blog, we will tell you everything about the Bank Mode in Avast antivirus. If you would have any other query regarding this then you may contact. For more information visit our website:

    ReplyDelete
  23. office setup is the main way to get the software because to use the software first it is important to install office setup. So, today I am going to discuss about the Microsoft office setup, what Microsoft office setup really is and how it works. For more info visit our website: www.office.com/setup

    ReplyDelete
  24. McAfee.com/activate - Protect unlimited devices with McAfee's complete virus protection and Internet Security. Get McAfee's software today to protect yourself against the threats. For more information visit our website- www.mcafee.com/activate...

    ReplyDelete
  25. Webroot Install Keycode - Activate webroot safe by entering keycode and protect your device. visit webroot.com/safe to verify webroot activation code. Install webroot antivirus with key code to remove threats without cd.

    ReplyDelete
  26. webroot safe be ready to absolutely secure yourself on-line with a simple webroot.com/safe installation which will be drained a matter of minutes. All you'd like is that the distinctive keycode to activate this antivirus on your device.

    ReplyDelete
  27. Mcafee Activate is one of the best eminent organizations that have been working for offering the best Mcafee.com/Activate items to its clients so they may remain associated with the advanced world by keeping away from the dangers related with itTo get more points of interest of our administrations simply call us at: (Toll Free) USA: 844-560-5500

    ReplyDelete
  28. After visiting the norton.com/setup, access your account, manage your subscription, and extend your Norton protection to PC, Mac, Android and iOS. www.Norton.com/setupwww.Norton.com/setupwww.Norton.com/setupwww.www.norton.com/setup: Learn, how to download and setup Norton Antivirus software For Windows and Mac OS PC/Laptop.

    ReplyDelete
  29. The Norton software is easy to install on the link norton.com/setup. The Norton 360 Antivirus helps you to detect, prevent and block the malicious sites or online threats. Here in this article, we will discuss the process to Unblock Website Norton 360 Antivirus.
    http://nortonnortoncom.com/

    ReplyDelete
  30. See Office 365 at Microsoft Download Libre Office Reason to switch. visit office.com/setup for Download, Installation and Activation Microsoft Office. Value The first thing that catches the eye about LibreOffice is the price tag, or more specifically the lack of one. http://officecomoffice.com/

    ReplyDelete
  31. Microsoft Office 2019 is the latest version of the office productivity suite and will be released in the second half of 2018. It was announced on 6th September 2017 at Microsoft Ignite. when you need to visit office.com/setup to Download, setup and install. http://officeofficecom.com/

    ReplyDelete
  32. If your device does not contain any older Office edition, then install the setup from office.com/setup. Make sure that the edition you choose is compatible with your device.Office.Com/Setup

    ReplyDelete
  33. Office.Com/Setup To activate your office online you need to go to office.com/setup or office.com/myaccount to redeem your product key.

    ReplyDelete
  34. Microsoft Office Setup is the full suite of Microsoft efficiency programming that joins an assortment of utilizations, administrations, and server like Excel, PowerPoint, Word, OneNote, Publisher and Access. Aside from the working frameworks, these projects are Microsoft's key items that are generally utilized programming on the planet. Microsoft Office.com/Setup bundles all the best programming that Microsoft brings to the table. http://officecom-office.com/

    ReplyDelete
  35. Avast support Provide complete support for Avast antivirus installation , uninstallation and updates.We are your tech support provider which is dedicated to provide best in class services for setup and installation of all kinds of software and hardware for computer systems and peripherals.Avast Customer Support Toll Free 1-844-546-5500.http://www.avastcomsupport.com/

    ReplyDelete
  36. install mcafee with product key Download & Install Online Help By Experts Disclaimer. if you want to more information visit our website- www.mcafee.com/activate...

    ReplyDelete
  37. Find how to download, introduce, activate all renditions of Microsoft Office setup and initiate on  office.com/setup |  www.office.com/setup

    ReplyDelete

More Posts

FOLLOW