tremor icon indicating copy to clipboard operation
tremor copied to clipboard

Legend does not show the correct colours for Chart

Open karansingh01 opened this issue 1 year ago • 1 comments

The Legend shows two black circles even when colour is chosen.

  <AreaChart
          className="h-[17.4rem] mt-4"
          data={selectedTimeFrame === "Last 30 days" 
            ? category.data.slice(-30) 
          : selectedTimeFrame === "Last 7 days" 
            ? category.data.slice(-7) 
          : category.data.slice(-1)}
          index="Day"
          categories={["Student", selectedView]}
          colors={['blue', 'slate']}
          maxValue={100}
          showXAxis={true}
          showYAxis={true}
          startEndOnly={false}
          showLegend={false}
          showTooltip={true}
          showGradient={true}
          valueFormatter={dataFormatterLineChart}
/>

karansingh01 avatar May 03 '23 11:05 karansingh01

Hey @karansingh01, may you share a complete example of your problem? You can add some dummy data resembling our original data. The rest should be fine as is, thanks!

severinlandolt avatar May 03 '23 12:05 severinlandolt

@karansingh01 Hey, were you able to make it work? Can I close this issue?

severinlandolt avatar Jul 03 '23 21:07 severinlandolt

Hi yeah it got solved! My bad, should have closed it a long time ago.

karansingh01 avatar Jul 03 '23 21:07 karansingh01