plouc / nivo

nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
https://nivo.rocks
MIT License
13.17k stars 1.03k forks source link

The prop `defs` is marked as required in `Ge2`, but its value is `undefined #2580

Closed Abdullahbutt3434 closed 6 months ago

Abdullahbutt3434 commented 6 months ago

Warning: Failed prop type: The prop layers is marked as required in Ge2, but its value is undefined. Warning: Failed prop type: The prop curve is marked as required in Ge2, but its value is undefined. Warning: Failed prop type: The prop enableGridY is marked as required in Ge2, but its value is undefined. image

I am getting all above errors on using **AreaBump** chart 
here is my react code

export default function AreaChart({ datas = [ { id: 'japan', color: 'hsl(96, 70%, 50%)', data: [ { x: 'plane', y: 273, }, { x: 'helicopter', y: 64, }, { x: 'boat', y: 274, }, { x: 'train', y: 246, }, { x: 'subway', y: 111, }, { x: 'bus', y: 237, }, { x: 'car', y: 173, }, { x: 'moto', y: 231, }, { x: 'bicycle', y: 101, }, { x: 'horse', y: 75, }, { x: 'skateboard', y: 83, }, { x: 'others', y: 207, }, ], }, ], title = null, }) { return ( <> <ResponsiveLine data={datas} colors={{ scheme: 'nivo' }} borderColor="#2170B5" margin={{ top: 20, right: 15, bottom: 20, left: 15 }} xScale={{ type: 'point' }} yScale={{ type: 'linear', min: 'auto', max: 'auto', stacked: true, reverse: false, }} axisTop={null} axisRight={null} axisBottom={null} pointSize={10} pointColor={{ theme: 'background' }} pointBorderColor={{ from: 'serieColor' }} pointBorderWidth={2} pointLabel="data.yFormatted" axisLeft={null} areaOpacity={0.5} lineWidth={1} enableGridX={false} enableArea={true} pointLabelYOffset={-12} enableTouchCrosshair={true} useMesh={true} // tooltip={input => { // return ( // // {input.point.data.x} // {input.point.data.y} // // ); // }} enableCrosshair={false} legends={[]} /> </> ); }

Chart is working fine image

plouc commented 6 months ago

@Abdullahbutt3434, please upgrade to 0.86.0, this issue has been fixed in the latest release.

Abdullahbutt3434 commented 6 months ago

image I am already using 0.86.0

plouc commented 6 months ago

@Abdullahbutt3434, my bad, it hasn't been released yet, I thought it was, it's been fixed by https://github.com/plouc/nivo/pull/2576, and this issue is a duplicate of https://github.com/plouc/nivo/issues/2539, I think I should be able to create a new release next week.

Abdullahbutt3434 commented 6 months ago

Sure thanks