Closed Madasamy26 closed 3 years ago
I am trying to create new chart with typescript like below
let chart = new barChart("#id");
But I want to create a new chart using HTMLElement node let chart = new barChart(node);
But in barChart type restricts the HTMLElement !!!
How to do that?
Internally the charts use d3 selection. If it is a string, it is passed to d3.select, if not it is assumed to be d3 selection. So, you should try the following:
d3.select
let chart = new barChart(d3.select(node));
I am trying to create new chart with typescript like below
let chart = new barChart("#id");
But I want to create a new chart using HTMLElement node let chart = new barChart(node);
But in barChart type restricts the HTMLElement !!!
How to do that?