Create Dynamic Bar Chart with TanStack Table Filter #364
Unanswered
ninoslat1
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, i would to share how to create a dynamic bar chart with a single filter. First, here is my filter component
and here is my TanStack React Charts code for the data visualization. Let say, you had an electric bike rental business, and you want to know how much usage each unit gets based on the data in TanStack Table. First, catch the list of electric bike codename in name column with getFacetedUniqueValues (In my case, the electric bike codename is in third column, so i wrote 2 in the column index). Then, create a data variable for the charts and using for each to search the value of mapped codename, and push it to data array. Last, define the axis for the codename and the amount of usage of electric bike per codename to visualize it.
Beta Was this translation helpful? Give feedback.
All reactions