Web [Charts]: Add categorical bar chart component
Created by: vovakulikov
Closes https://github.com/sourcegraph/sourcegraph/issues/32940 Closes https://github.com/sourcegraph/sourcegraph/issues/32942 Closes https://github.com/sourcegraph/sourcegraph/issues/32943
This PR adds a new chart component - the bar chart. This chart represents categorical-like data (it's different from series-like data where the x-axis acts as a timeframe, in categorical-like data x-axis is a set of different categories)
Chart type | Example |
---|---|
Regular categories | |
Categories with sub groups | |
Categories with stacked groups |
This component also reuses the tooltip that we implemented during the line chart development.
A few things to notice that are not implemented/covered by this PR
- This PR doesn't add a new bar chart for series-like (through time) data
- This PR's bar chart doesn't cover all corner cases around label positioning
Test plan
- Make sure that the chart has the right Y/X labels and correctly represents data sets in storybook stories
- Make sure that the tooltip works correctly in all modern browsers (Firefox, Safari, Chrome)
App preview:
Check out the client app preview documentation to learn more.