UNPKG

opendash

Version:

open.DASH data visualization framework

21 lines 751 B
import React from "react"; import Highcharts from "highcharts"; export var HighchartsGantt = React.memo(function (_a) { var options = _a.options, style = _a.style; var element = React.useRef(null); var chart = React.useRef(null); React.useEffect(function () { // @ts-ignore chart.current = Highcharts.ganttChart(element.current, options); return function () { chart.current.destroy(); }; }, []); React.useEffect(function () { if (chart.current) { chart.current.update(options, true, true, true); } }, [options]); return React.createElement("div", { ref: element, style: style }); }); //# sourceMappingURL=HighchartsGantt.js.map