carbon-addons-data-viz-react
carbon-addons-data-viz-react copied to clipboard
Bar graph component showing both X-axis and Yaxis data together when hover over bars
Title line template: [Title]: Brief description
Bar graph component showing both X-axis and Yaxis data together when hover over bars.
Detailed description
I am using Bar graph component . Problem is that on hover over the bars it shows both X-axis and Yaxis data together . Can we have it just show Y- axis label ?
Is this issue related to a specific component?
Yes Bar graph component
What did you expect to happen? What happened instead? What would you like to see changed?
When i hover over the bars i expect it to show just the Y-axis data instead of showing both
What browser are you working in?
Chrome
What version of the Carbon Design System are you using?
1.20.3
What offering/product do you work on? Any pressing ship or release dates we should be aware of?
IBM watson assistant solution
Steps to reproduce the issue
- Just hover over the bars to see the value
Additional information
- Screen
shots or code <BarGraph width={ 1220 } height={ 350 } id="graph" containerId="containerId" xAxisLabel={ "Current month" } yAxisLabel={ "Interaction" } emptyText="There is currently no data available" color={['#00a68f', '#3b1a40']} />
- Notes
Could you please try recreating the problem on CodeSandbox? https://codesandbox.io/s/kxlwyj7635
I have recreated the issue . https://codesandbox.io/s/xl88zk1yz i want to see "5" on hover not "045"
I see. For now, you can turn showLabels={false}
and use the onHover
to display your own tooltips
Hi @brsebas,
I was seeing your codesandebox
and you didn't include the sass file that is specified in the documentation:
@import 'carbon-addons-data-viz-react/sass/index';
If you include it the data-tooltip will render properly: https://codesandbox.io/s/pknlwk8q9j
@tw15egan I wanted to help with this issue but once I forked the repo I realized that there was no issue. But I would suggest to also generate a CSS file so there's no need to import the sass file.
🙏 Thank you for confirming, @miukimiu! Compiling the scss and adding the css to the exported files would be a great enhancement. Thanks for the suggestion!