Skip to content

p-herbert/react-highcharts

Repository files navigation

React-Highcharts

React wrapper for Highcharts based on the offical package.

Improvements

  • Uses the new React Hooks API.
  • Uses flexbox to dynamically set the chart container width.
  • Lazy loading support out of the box.
  • Development server with live reloading for quickly prototyping charts.

API

Parameter Type Required Defaults Description
chartId String yes - Unique identifier for the chart
constructorType String no 'chart' String for constructor method. Official constructors:
- 'chart' for Highcharts charts
- 'stockChart' for Highstock charts
- 'mapChart' for Highmaps charts
- 'ganttChart' for Gantt charts
options Object no {} Highcharts chart configuration object. Please refer to the Highcharts API documentation.
allowToUpdate Boolean no true Allow the chart to update.
chartLoadedCallback Function no undefined Callback function that is called once the chart is created.
theme Object no undefined Pre-defined defaults to apply to each chart.
height String no 600px Height of the chart's container.
highcharts Object no Highcharts Used to pass the Highcharts instance after modules are initialized.

Development

The development server files are located under the folder dev. The server can be launched using the command

npm run dev

It will run on http://localhost:8080.

About

React Highcharts wrapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published