3D Pie chart in Highcharts/Javascript

前端 未结 3 1862
攒了一身酷
攒了一身酷 2021-01-16 04:52

I need to draw 3d pie chart in javascript. It should look like below :- \"3d

There are various exam

相关标签:
3条回答
  • 2021-01-16 04:54

    Well, we are right now working on 3D charts, see:

    • scatter chart
    • pie
    • another pie
    • half-pie
    • column chart
    • another column chart

    Edit: It's already released with Highcharts 4.x version, see samples.

    0 讨论(0)
  • 2021-01-16 04:55

    It's the top most requested feature in Highcharts.

    http://highcharts.uservoice.com/forums/55896-general and it looks like we have to wait some time!

    Does it support 3D pie chart?

    But using Google visualization API you can achieve this very easily. enter image description here

    code

       <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([
              ['Task', 'Hours per Day'],
              ['Work',     11],
              ['Eat',      2],
              ['Commute',  2],
              ['Watch TV', 2],
              ['Sleep',    7]
            ]);
    
            var options = {
              title: 'My Daily Activities',
              is3D: true,
            };
    
            var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
            chart.draw(data, options);
          }
        </script>
      </head>
      <body>
        <div id="piechart_3d" style="width: 900px; height: 500px;"></div>
      </body>
    </html>
    

    See documentation for more features https://developers.google.com/chart/interactive/docs/gallery/piechart

    Hope I helped you :)

    0 讨论(0)
  • 2021-01-16 05:01

    Orson Charts for HTML5 does 3D pie charts (amongst others), but not with the multiple levels that you show in the example (what do the levels indicate?). Charts can be rotated at any angle (see live demos), tooltip and mouse event support is on the way.

    Sample pie chart

    0 讨论(0)
提交回复
热议问题