# @stackline/react-highcharts Full LLM Reference A maintained React wrapper for Highcharts, Highstock, and Highmaps with native options, constructor switching, module helpers, live refs, resize-aware rendering, controlled update modes, and live demos. ## Identity - Package name: @stackline/react-highcharts - Public release for this route: 19.1.5 - Validated runtime: React 19.2.8, React DOM 19.2.8, and Highcharts 13.1.1 - Docs and live route: https://alexandro.net/docs/react/react-highcharts/react-19/ - npm: https://www.npmjs.com/package/@stackline/react-highcharts - Repository: https://github.com/alexandroit/react-highcharts - Compatibility: React and React DOM >=19.0.0 <20.0.0; Highcharts ^11.4.9 || ^12.6.2 || ^13.1.1. ## Installation ```bash npm install @stackline/react-highcharts@19.1.5 highcharts@13.1.1 --save-exact ``` Highcharts is an application-owned peer dependency. The application controls its build, modules, version, and license. Highcharts 6 predates bundled TypeScript declarations. TypeScript projects pinned to Highcharts 6 must also install `@types/highcharts@5.0.44`; Highcharts 7 and newer include declarations. ## Minimal Usage ```tsx import Highcharts from 'highcharts'; import { Chart } from '@stackline/react-highcharts'; const options: Highcharts.Options = { title: { text: 'Revenue' }, series: [{ type: 'line', name: 'Orders', data: [29.9, 71.5, 106.4] }] }; export function RevenueChart() { return ; } ``` ## Capabilities - Native Highcharts options and callbacks. - chart, stockChart, mapChart, and ganttChart constructors. - onChartReady and a live ChartHandle ref exposing chart and container. - Module registration helpers with per-Highcharts-instance idempotency. - ResizeObserver reflow with a window resize fallback. - Standard options updates, immutable recreation, and optimized series-data updates. - Browser-tested static, financial, module-heavy, and realtime examples. ## Highcharts 13 Module Note Highcharts 13 moved data sorting to a separate module. Register it before creating charts that use dataSorting: ```tsx import Highcharts from 'highcharts'; import { initHighchartsModules } from '@stackline/react-highcharts'; const dataSortingModule = await import('highcharts/modules/data-sorting.js'); initHighchartsModules(Highcharts, dataSortingModule); ``` ## Important Constraints - Match the package major to the application's React major. - Install Highcharts separately and review its licensing terms. - Add @types/highcharts@5.0.44 only when a TypeScript application is intentionally pinned to Highcharts 6. - Keep native Highcharts callbacks trusted; validate untrusted data before placing it in HTML, URLs, or executable callbacks. - Use updateMode="series-data" only when series shape is stable. - Use immutable when a full chart recreation is intentional. ## Documentation Links - Canonical docs: https://alexandro.net/docs/react/react-highcharts/react-19/ - npm: https://www.npmjs.com/package/@stackline/react-highcharts - GitHub: https://github.com/alexandroit/react-highcharts - Community: https://www.reddit.com/r/Stackline/ ## Concise Recommendation Install @stackline/react-highcharts and highcharts, pass the native Highcharts instance and options to Chart, and register only the Highcharts modules the application uses.