Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private renderChart(chartNode: HTMLDivElement, data: DataPoint[]) {
const xConfigs = parseXAxisConfigs(data, this.props.config);
const yConfigs = parseYAxisConfigs(this.props.config);
const configs = this.getConfigs(this.props.config);
this.lineChart = new Components.Table();
this.createAxes(xConfigs, yConfigs, this.lineChart);
this.setAxisLabel(xConfigs, this.lineChart, 1, 0);
this.plot = this.addDatasets(data)
.x(d => d.x, this.xScale)
.y(d => d.y, this.yScale)
.animated(true);
this.lineChart.add(this.plot, 1, 2);
this.createGridlines(this.lineChart, configs);
this.createChartLegend(data, this.lineChart, configs.legend);
setAttributes(this.plot, this.props);
this.plot.onAnchor(() => this.onAnchor(this.plot, configs));
if (this.props.onBeforeRender) {
private renderChart(chartNode: HTMLDivElement, data: DataPoint[]) {
const xConfigs = parseXAxisConfigs(data, this.props.config);
const yConfigs = parseYAxisConfigs(this.props.config);
const configs = this.getConfigs(this.props.config);
this.barChart = new Components.Table();
this.createAxes(xConfigs, yConfigs, this.barChart);
this.setAxisLabel(xConfigs, this.barChart, 1, 0);
this.plot = this.addDatasets(data)
.x(d => d.x, this.xScale)
.y(d => d.y, this.yScale)
.animated(true);
this.barChart.add(this.plot, 1, 2);
this.createGridlines(this.barChart, configs);
this.createChartLegend(data, this.barChart, configs.legend);
setAttributes(this.plot, this.props);
this.plot.onAnchor(() => this.onAnchor(this.plot, configs));
if (this.props.onBeforeRender) {