Hello,

It's possible to change from horizontal to vertical or any angle index 
label (number) from this code:

<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([
        ["Element", "Density", { role: "style" } ],
        ["Copper", 8.94, "#b87333"],
        ["Silver", 10.49, "silver"],
        ["Gold", 19.30, "gold"],
        ["Platinum", 21.45, "color: #e5e4e2"]
      ]);

      





*var view = new google.visualization.DataView(data);      view.setColumns([0, 
1,                       { calc: "stringify",                         
sourceColumn: 1,                         type: "string",                        
 role: "annotation" },                       2]);*

      var options = {
        title: "Density of Precious Metals, in g/cm^3",
        width: 600,
        height: 400,
        bar: {groupWidth: "95%"},
        legend: { position: "none" },
      };
      var chart = new 
google.visualization.ColumnChart(document.getElementById("columnchart_values"));
      chart.draw(*view*, options);
  }
  </script>
<div id="columnchart_values" style="width: 900px; height: 300px;"></div>


https://developers.google.com/chart/interactive/docs/gallery/columnchart

Thank you!

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/0eb96d85-0cd7-4c1a-a812-34f1411df7ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to