Export issue
TylerKnvpp opened this issue · 3 comments
Used example code to check to see if it works:
import { ReactMinimalPieChart } from "react-minimal-pie-chart";
<ReactMinimalPieChart
animationDuration={500}
animationEasing="ease-out"
center={[50, 50]}
data={[
{
color: "#E38627",
title: "One",
value: 10,
},
{
color: "#C13C37",
title: "Two",
value: 15,
},
{
color: "#6A2135",
title: "Three",
value: 20,
},
]}
labelPosition={50}
lengthAngle={360}
lineWidth={15}
paddingAngle={0}
radius={50}
rounded
startAngle={0}
viewBoxSize={[100, 100]}
/>
got this error:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Hi @TylerKnvpp,
the component is expected to be imported as:
import { PieChart } from "react-minimal-pie-chart";
Where did you find the wrong example?
Hey @toomuchdesign - yep! Below is the link to the example: