next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

Error: yAxisLabels is not defined

Open devtalcorp opened this issue 1 year ago • 0 comments

https://nextjs.org/learn/dashboard-app/fetching-data#fetching-data-for-revenuechart

Then, uncomment the <RevenueChart/> component, navigate to the component file (/app/ui/dashboard/revenue-chart.tsx) and uncomment the code inside it. Check your localhost, you should be able to see a chart that uses revenue data.

This generates Error: yAxisLabels is not defined

I propose adding this fix:

  const chartHeight = 350;`
  const { yAxisLabels, topLabel } = generateYAxis(revenue);

devtalcorp avatar Feb 08 '24 21:02 devtalcorp