Highcharts

Start your Highcharts journey today

立即试用
立即购买
Skip to Content
文档React集成(测试版)快速入门

Getting started

** Note: version 4 of our React integration is currently in beta. Features described may change at any time **

Requirements

The beta release has been tested with:

1. Install Highcharts and highcharts-react from npm

Install the Highcharts package along with our React integration  from npm by running:

npm install highcharts @highcharts/react

2. Add Chart, Series and Title components

In your JSX file, import the necessary components:

import { Chart, Series, Title } from '@highcharts/react';

3. Create your chart

Now, you can create a simple chart like this:

function ChartComponent () { return ( <Chart> <Title>Line chart</Title> <Series type="line" data={[1, 2, 3]} /> </Chart> ) }

For more in-depth information on configuring your chart, see the documentation for the Chart and Series  components, and how to set options .

The result should look like this: