Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import TuiChart from 'tui-chart';
const creator = {
bar: TuiChart.barChart,
column: TuiChart.columnChart,
line: TuiChart.lineChart,
area: TuiChart.areaChart,
bubble: TuiChart.bubbleChart,
scatter: TuiChart.scatterChart,
pie: TuiChart.pieChart,
combo: TuiChart.comboChart,
map: TuiChart.mapChart,
heatmap: TuiChart.heatmapChart,
treemap: TuiChart.treemapChart,
radial: TuiChart.radialChart,
boxplot: TuiChart.boxplotChart,
bullet: TuiChart.bulletChart
};
export default function(chartType) {
return class ChartFactory extends React.Component {
rootEl = React.createRef();
chartInst = null;
getRootElement() {
return this.rootEl.current;
}
getInstance() {