AnsweredAssumed Answered

html and google gauges

Question asked by martinc on Dec 2, 2017
Latest reply on Dec 4, 2017 by martinc

The google gauges are pretty cool.

I'm making a template to use for various presentations.

I want to add a label such as 'Sales Report'

how can I not display "data:text/html;charset=UTF-8,"

 

Screen Shot 2017-12-02 at 2.47.51 PM.png

 

Here is the code in the web viewer:

 

"<html>

<body>

 

 

<h1>Sales Report</h1>

</body>

</html>"

&

"data:text/html;charset=UTF-8,<html>

 

 

 

 

<html>

  <head>

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

   <script type=\"text/javascript\">

      google.charts.load('current', {'packages':['gauge']});

      google.charts.setOnLoadCallback(drawChart);

 

 

      function drawChart() {

 

 

        var data = google.visualization.arrayToDataTable([

          ['Label', 'Value'],

          ['One', 80],

          ['Two', 55],

          ['Three', 68]

        ]);

 

 

        var options = {min: 0, max: 300,

          width: 400, height: 120,

          greenFrom: 50, greenTo: 200,

          yellowFrom:10, yellowTo: 50,

          minorTicks: 5

        };

 

 

        var chart = new google.visualization.Gauge(document.getElementById('chart_div'));

 

 

        chart.draw(data, options);

      }

 

 

            </script>

  </head>

  <body>

    <div id=\"chart_div\" style=\"width: 400px; height: 120px;\"></div>

  </body>

</html>"

Outcomes