Skip to content

Sparklines

Will Hawker edited this page Aug 16, 2017 · 2 revisions

React JSX Highcharts provides a helper component for Sparklines - <HighchartsSparkline />

At the minimum <HighchartsSparkline /> expects a series to be passed as a child component

Example

<HighchartsSparkline>
  <AreaSeries id="my-series" data={data} />
</HighchartsSparkline>

If you need to pass more configuration to a <HighchartsSparkline /> - for example a tooltip - pass the series on the series prop. Then pass the rest of the options as component children.

Example

<HighchartsSparkline
  series={
    <AreaSeries id="my-series" name="My Series" data={data} />
  }
>
  <Tooltip
    shadow={false}
    hideDelay={0} />
</HighchartsSparkline>