jakezatecky/d3-funnel

Power BI Custom Visual

grajamanickam opened this issue · 1 comments

@jakezatecky Thanks for the excellent d3-funnel library. I am trying to create a Power BI custom visual using your d3-funnel library. I can't able to get the funnel drawn

Here is my code

this.svg = d3.select(options.element) .append('svg') .classed('d3Funnel', true);

this.container = this.svg.append("g") .classed('container', true) .attr("id", "container");

this.funnel = this.container.append("div") .classed("bhFunnel", true) .attr("id", "bhFunnel");

const data = [ { label: 'Inquiries', value: 5000 }, { label: 'Applicants', value: 2500 }, { label: 'Admits', value: 500 }, { label: 'Deposits', value: 200 }, ];

const option = { chart: { height: 400, }, block: { dynamicHeight: true, minHeight: 15, }, };

const chart = new D3Funnel(this.funnel); chart.draw(data, option);

Started working now after I changed the code to var chart = new D3Funnel("#container");