Questions tagged [react-google-charts]

A thin, typed, React wrapper for Google Charts.

Website (+demos)

https://react-google-charts.com/

npm

https://www.npmjs.com/package/react-google-charts

Usage

import * as React from "react";
import { render } from "react-dom";
import { Chart } from "react-google-charts";

export default class App extends React.Component {
  render() {
    return (
      <div className={"my-pretty-chart-container"}>
        <Chart
          chartType="ScatterChart"
          data={[["Age", "Weight"], [4, 5.5], [8, 12]]}
          width="100%"
          height="400px"
          legendToggle
        />
      </div>
    );
  }
}
render(<App />, document.querySelector("#app"));

Screenshot

screenshot

168 questions
-1
votes
2 answers

How to send data to the chart using JS?

I get some data using Node.js. And I have an HTML file with Google Chart. I want to send the info which I get in Node.js to the Google Chart in my HTML, so that when I open the page I can see the chart with info which I got in Node.js. I don't have…
-1
votes
1 answer

Not able to pull data from an API and plot the data in React

I've an API http://api.openweathermap.org/data/2.5/forecast?q=bengaluru&appid={API_KEY} I'm trying to fetch data from that API and plot data by using react-google-charts. Code: import React from 'react'; import { makeStyles } from…
Ajay Kulkarni
  • 2,900
  • 13
  • 48
  • 97
-1
votes
2 answers

How to pass data in react-google-charts effectively without hardcoding?

So my code is working absolutely fine my array is in correct syntax everything is fine But i find myself hardcoding data manually in JSX ( in
Phil
  • 435
  • 2
  • 9
  • 28
1 2 3
11
12