UNPKG

@highcharts/react

Version:
54 lines (36 loc) 884 B
# Highcharts React _Official Highcharts React Integration_ # Installing *NPM* ``` npm i @highcharts/react ``` *Yarn* ``` yarn add @highcharts/react ``` # Basic Usage In order to run the below sample, you also need to add react and react-dom to your dependencies - `npm install react react-dom` in addition to the Highcharts Integration. ```jsx import React from 'react'; import { createRoot } from 'react-dom/client'; import { Chart, Title } from '@highcharts/react'; import { Area, Line } from '@highcharts/react/series'; export function Application () { return ( <Chart> <Title>Chart with multiple series types</Title> <Area.Series data={[0, 1, 2, 3]} /> <Line.Series data={[2, 1, 3, 1]} /> </Chart> ); } const root = createRoot(document.getElementById('root')); root.render(<Application />); ```