Anyone have suggestion or ever worked on Ag grid sparkline bar chart
From this example we can display % Bars
in Left to Right direction but I have another column for the same category to show % Bars
in Right to Left direction, so that two percentages can be compared
I want to show exactly above in rever direction for another column
2
Answers
I have explored few options in the AgGrid for this kind of implementation but could not find anything specific. So I got a work around to solve this problem, by changing the data shape a bit to show bars left to right & right to left, where these columns will be next to each other to compare.
After few hours of investigation, created the sample, which is as below. The code does the trick is defining the right
data
&valueAxiDomain
prop in the ColDefsOutput:
Code
Working Version: Ag grid with Bar SparkLine Comparison
If you can skip labels or put labels in a separate column, then with css
transform: scaleX(-1)
it flips the bar horizontally.