I'll update the component to show only High, Close, and Low lines with the specified HSL colors. I'll also remove the Open line from the chart and legend.
Here's the updated component with the requested changes:
stock-picker-three-lines.tsx
Key changes made to the component:
Updated the chartConfig object to include only High, Close, and Low, with the specified HSL colors:
stocksData object for all stocks.Updated the LineChart component to render only three lines:
<Line type="monotone" dataKey="high" stroke={chartConfig.high.color} dot={false} strokeWidth={2} />
<Line type="monotone" dataKey="close" stroke={chartConfig.close.color} dot={false} strokeWidth={2} />
<Line type="monotone" dataKey="low" stroke={chartConfig.low.color} dot={false} strokeWidth={2} />This updated component now displays only the High, Close, and Low lines for each stock, using the specified HSL colors. The chart and legend have been adjusted accordingly, while maintaining all other features and styling of the original component.
Here are some nits I want you to address:
I'll address these nits and update the component accordingly.
Here's the updated component with the requested changes:
stock-picker-nits-addressed.tsx
Here are the changes made to address the nits:
Updated the trending percentage and arrow color:
text-green-500text-red-500Made the trending text smaller:
text-xl to text-base font-mediumImproved the subtext for better contrast and slightly larger size:
text-sm text-muted-foreground to text-sm text-gray-300Adjusted the layout of the trending information:
ml-1 to the arrow icon for better spacingThese changes address all the requested nits while maintaining the overall functionality and structure of the component. The code remains complete and can be directly used in a Next.js application with the required dependencies and Tailwind CSS configuration.