You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To avoid changing the type of the categories prop to be some kind of Category[] rather than string[], you could copy the pattern followed by the categories and colors props:
What problem does this feature solve?
I want to display a "mixed" bar chart; where some bars within a category are stacked and others are either not, or are stacked separately.
This is possible in
recharts
, the library thattremor
is using to display charts, using thestackId
property:In
tremor
, this line currently sets all bars to use the same stack:tremor/src/components/chart-elements/BarChart/BarChart.tsx
Line 335 in bd6566b
What does the proposed API look like?
Suggestion 1
With this addition, there are really several different props taken by
tremor
related tocategories
, that are passed to therecharts
<Bar>
component.You could consider changing the
categories
prop fromstring[]
to some kind ofCategory[]
object:Suggestion 2
To avoid changing the type of the
categories
prop to be some kind ofCategory[]
rather thanstring[]
, you could copy the pattern followed by thecategories
andcolors
props:The text was updated successfully, but these errors were encountered: