score:1
You're probably trying to create a graph when the data has not yet been downloaded. Please take a look at the example below, you can see how you can create a chart with dynamic data:
class App extends React.Component {
constructor(props) {
super(props);
}
componentDidMount() {
fetch("https://api.myjson.com/bins/q4us4")
.then(response => response.json())
.then(data => {
options.series[0].data = data;
this.setState({ data: data });
});
}
render() {
return (
<div>
{this.state &&
this.state.data && (
<Chart options={options} highcharts={Highcharts} ref={"chart"} />
)}
</div>
);
}
}
render(<App />, document.getElementById("root"));
Live demo: https://codesandbox.io/s/mz35zwxjoj
Source: stackoverflow.com
Related Query
- Highcharts official + React, series population from JSON?
- Highcharts displays series names but missing data points from json source
- adding series to highcharts from JSON
- Highcharts multiple series json from php
- passing json values to highcharts from .net code behind
- Charts using Highcharts with multiple series from JSON
- Highcharts with multiple series from JSON Dynamically
- Highcharts with multiple series from JSON
- Remove gap in Highcharts column chart from null value from JSON file in React
- Extract data series from a JSON array for a Highcharts chart with 2 y-axis
- Highcharts not displaying series pushed from JSON
- Add Categories and Series dynamically from JSON in HighCharts
- Plotting multiple series from JSON php import to Highcharts
- Plotting multiple series in single Highcharts plot from JSON
- Highcharts display date as series label from JSON data?
- Highcharts multiple series from json
- How to render highcharts from external json for multiple series
- How can I assign multiple series from my json data? Highcharts
- Highcharts multiple series from JSON with different style depending on serie name
- HighCharts Hide Series Name from the Legend
- Proper way to remove all series data from a highcharts chart?
- How can I hide series from a HighCharts legend?
- How can I hide a series from initially being displayed in Highcharts
- Highlighting Highcharts series from a remote element
- Send JSON data to highcharts pie from asp.net MVC controller in C#
- Highcharts with JSON data and multiple series
- Loading Highcharts series from XML using jQuery
- How can I delete all of the points from a highcharts series
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts C# To JSON - Structuring Series Data
More Query from same tag
- Highcharts - Redraw empty chart
- How to display maximum and minimum value on the basis of date selected in High Charts?
- Is it possible to use the offline export in stockchart?
- Datatable Highcharts
- not able ot show date in x axis in highcharts
- In TypeScript, how do I work out the proper type for 'this'?
- HIghcharts Scrollbar (w/ showFull false) displays after setExtremes called
- Mouse wheel event, not working as expected in Firefox, when using Highcharts with PerfectScrollbar
- Dynamic Highstock chart when no data at start
- highcharts js move series data container up
- Problem loading an array initialized in another script on webpage
- How to open ui-bootstrap dropdown on clicking over angular highcharts
- Does Highcharts use Cookies?
- Select Point Programmatically (e.g. from TableView Cell or Button)
- highchart is not displaying in django twitter bootstrap
- Highcharts JS Uncaught TypeError: x[(intermediate value)(intermediate value)(intermediate value)] is not a constructor
- high charts pie chart should be displayed in ascending order
- Highcharts - how to update series in angular?
- Highcharts Realtime Multi-series
- Highcharts Wind rose increase surface bar
- How to change marker symbol based on value in angularjs
- Highstock Time series with uneven data set distrubition
- Highcharts - Stack a full serie (Bar chart)
- High Chart Issue on VS 2008
- Show x-Axis line but hide all data points
- can hightcharts make ajax calls to external data files?
- Highcharts tooltip formatter function does not display values in table correct
- Mouse behavior buggy?
- HighCharts remove $ and % symbols from custom html table when creating graph
- Highcharts - How to Highlight a specific portion of a line graph?