Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guage chart is giving not a constructor error #9

Closed
stardev24 opened this issue Mar 14, 2021 · 1 comment
Closed

Guage chart is giving not a constructor error #9

stardev24 opened this issue Mar 14, 2021 · 1 comment

Comments

@stardev24
Copy link

As per the given documentation I have added guage in packages array.

     const image = await GoogleChartsNode.render(drawChart, {
                        width: 400,
                        height: 300,
                        packages:['gauge']
          });

And draw function is given as

function drawChart() {

    var data = google.visualization.arrayToDataTable([
        ['Label', 'Value'],
        ['Memory', 80]
      ]);

      var options = {
        width: 400, height: 120,
        redFrom: 90, redTo: 100,
        yellowFrom:75, yellowTo: 90,
        minorTicks: 5
      };

	const chart = new google.visualization.Guage(container);
	chart.draw(data, options);
  }

But If I try to access it from express server I am getting

Page error: Error: TypeError: google.visualization.Guage is not a constructor.
Please help

GuageChartError

@typpo
Copy link
Owner

typpo commented Mar 14, 2021

You're spelling Gauge wrong. Gauge, not Guage

@typpo typpo closed this as completed Mar 14, 2021
typpo added a commit that referenced this issue Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants