Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PieChart not rendering #164

Open
Kunal1985 opened this issue Sep 3, 2018 · 1 comment
Open

PieChart not rendering #164

Kunal1985 opened this issue Sep 3, 2018 · 1 comment

Comments

@Kunal1985
Copy link

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

@asifsha
Copy link

asifsha commented May 25, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants