react-d3-components icon indicating copy to clipboard operation
react-d3-components copied to clipboard

PieChart not rendering

Open Kunal1985 opened this issue 7 years ago • 1 comments

Hi, I am using the PieChart example but it is not rendering. Below the error in Browser console logs. Error: attribute y1: Expected length, "NaN". Error: attribute y2: Expected length, "NaN". Error: attribute transform: Expected number, "rotate(NaN)". Error: attribute transform: Expected number, "translate(NaN,NaN)". Error: attribute transform: Expected number, "translate(NaN,NaN)".

Kindly suggest if i am missing something here.

Thanks, Kunal

Kunal1985 avatar Sep 03 '18 11:09 Kunal1985

var sort = null; var dataPie = { label: 'somethingA', values: [{ x: 'SomethingA', y: 10 }, { x: 'SomethingB', y: 4 }, { x: 'SomethingC', y: 3 }] };

<PieChart data={dataPie} width={600} height={400} margin={{ top: 10, bottom: 10, left: 100, right: 100 }} sort={sort} />

image

Worked for me, can you please try again?

asifsha avatar May 25 '19 11:05 asifsha