How to place chart top and bottom?

sxxxxxxx

I want to display one of the chart underneath the other but for now only the 1st chart is showing and I can't seem to display the other chart at the bottom of it. Also, how do I make the chart align to the middle?

 <section>
    <html>
    <div class="container"></div>

    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

    <div id="columnchart_values" style="width: 1200px; height: 700px;"></div>
      <script type="text/javascript">
        google.charts.load("current", {packages:['corechart']});
        google.charts.setOnLoadCallback(drawChart);
        function drawChart() {
          var data = google.visualization.arrayToDataTable([
            ["Week", "# of F2F=0"],
            ["Copper", 8.94],
            ["Silver", 10.49],
            ["Gold", 19.30],
            ["Platinum", 0]
          ]);

          var view = new google.visualization.DataView(data);
          var options = {
            title: "Period: ASEAN 2Q F2F = 0 Dashboard",
            'backgroundColor': 'transparent', 
            width: 600,
            height: 400,
            bar: {groupWidth: "70%"},
            legend: { position: "right" },
          };
          var chart = new google.visualization.ColumnChart(document.getElementById("columnchart_values"));
          chart.draw(view, options);
         }
      </script>

    <div id="piechart_3d" style="width: 1200px; height: 700px;"></div>
        <script type="text/javascript">
          google.charts.load("current", {packages:["corechart"]});
          google.charts.setOnLoadCallback(drawChart);
          function drawChart() {
            var data = google.visualization.arrayToDataTable([
              ['Number of calls made', 'Number of people'],
              ['F2F = 0', 6],
              ['1 < F2F < 5', 8],
              ['F2F > 9', 5]
            ]);

            var options = {
              title: 'Period: ASEAN2QWK3',
              titleTextStyle: {
                fontSize: 21
              },
              'backgroundColor': 'transparent',   
              is3D: true,
            };

            var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
            chart.draw(data, options);
          }
        </script>

    </html>
    </section>
Krishnakant

You are calling '.load' method twice, which is incorrect.

Just comment below line for second chart and both chart will be loaded.

google.charts.load("current", {packages:["corechart"]});

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

A white place from top to the bottom

From Dev

A white place from top to the bottom

From Dev

How can I place html text on top of a canvas flot chart?

From Dev

How to place x axis labels on top of horizontal bar chart

From Dev

How can I place html text on top of a canvas flot chart?

From Dev

How to draw line chart using jfreechart from top to bottom?

From Dev

Place a recyclerview between 2 views on top and bottom

From Dev

how to scroll top and bottom

From Dev

Scene2d: How to place a widget at the bottom of the screen and another one at the top?

From Dev

How to place this div to the bottom of the page

From Dev

How place pivot header bottom?

From Dev

How to place this div to the bottom of the page

From Dev

Chart.js: Reverse bar chart with regular bars (Bottom to top instead of top to bottom)

From Dev

How to place labels on top of the margin?

From Dev

place 1 label top, 1 input bottom and 2 buttons left

From Dev

Html, Place items from an array in the top/bottom <div> based on a property

From Dev

How to fade in from bottom to top

From Dev

How to sort json bottom to top

From Dev

How can I make the top and bottom elements of my view controller stay in place, while the middle has elements to vertically scroll through?

From Java

Place several symbols on top of each candle on the canvas chart

From Dev

manipulating top and bottom margins in pyplot horizontal stacked bar chart (barh)

From Dev

Add a custom label to the top or bottom of a stacked bar chart

From Dev

How to place a button at the center of the bottom half of the screen

From Dev

How can I place column content on the bottom?

From Dev

How to place a text next to image with caption on bottom

From Dev

How to place a text next to image with caption on bottom

From Dev

How can I place column content on the bottom?

From Dev

How to place TextView at the very bottom of ContraintLayout?

From Dev

How to place a control at the bottom of another one?

Related Related

  1. 1

    A white place from top to the bottom

  2. 2

    A white place from top to the bottom

  3. 3

    How can I place html text on top of a canvas flot chart?

  4. 4

    How to place x axis labels on top of horizontal bar chart

  5. 5

    How can I place html text on top of a canvas flot chart?

  6. 6

    How to draw line chart using jfreechart from top to bottom?

  7. 7

    Place a recyclerview between 2 views on top and bottom

  8. 8

    how to scroll top and bottom

  9. 9

    Scene2d: How to place a widget at the bottom of the screen and another one at the top?

  10. 10

    How to place this div to the bottom of the page

  11. 11

    How place pivot header bottom?

  12. 12

    How to place this div to the bottom of the page

  13. 13

    Chart.js: Reverse bar chart with regular bars (Bottom to top instead of top to bottom)

  14. 14

    How to place labels on top of the margin?

  15. 15

    place 1 label top, 1 input bottom and 2 buttons left

  16. 16

    Html, Place items from an array in the top/bottom <div> based on a property

  17. 17

    How to fade in from bottom to top

  18. 18

    How to sort json bottom to top

  19. 19

    How can I make the top and bottom elements of my view controller stay in place, while the middle has elements to vertically scroll through?

  20. 20

    Place several symbols on top of each candle on the canvas chart

  21. 21

    manipulating top and bottom margins in pyplot horizontal stacked bar chart (barh)

  22. 22

    Add a custom label to the top or bottom of a stacked bar chart

  23. 23

    How to place a button at the center of the bottom half of the screen

  24. 24

    How can I place column content on the bottom?

  25. 25

    How to place a text next to image with caption on bottom

  26. 26

    How to place a text next to image with caption on bottom

  27. 27

    How can I place column content on the bottom?

  28. 28

    How to place TextView at the very bottom of ContraintLayout?

  29. 29

    How to place a control at the bottom of another one?

HotTag

Archive