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

REQUEST: Geochart Example #24

Open
lastcoolnameleft opened this issue May 22, 2024 · 0 comments
Open

REQUEST: Geochart Example #24

lastcoolnameleft opened this issue May 22, 2024 · 0 comments

Comments

@lastcoolnameleft
Copy link

Thanks for this project. I've gotten so close and have gotten the base chart working; however, there appears to be an issue when using a geochart as the results always turn out blank for me.

Source inspired by: https://developers.google.com/chart/interactive/docs/gallery/geochart

Using your example, I replaced it with this and start getting a blank screen:

    var data = google.visualization.arrayToDataTable([
      ['Country', 'Popularity'],
      ['Germany', 200],
      ['United States', 300],
      ['Brazil', 400],
      ['Canada', 500],
      ['France', 600],
      ['RU', 700]
    ]);

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

  // Render the chart to image
  const image = await GoogleChartsNode.render(drawChart, {
    width: 400,
    height: 300,
    mapsApiKey: '<REMOVED KEY>',
    packages: ['geochart', 'corechart'],
  });
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

1 participant