carbon-addons-data-viz-react icon indicating copy to clipboard operation
carbon-addons-data-viz-react copied to clipboard

Bar graph component showing both X-axis and Yaxis data together when hover over bars

Open brsebas opened this issue 6 years ago • 5 comments

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

  1. Just hover over the bars to see the value

Additional information

  • Screen bar_hover_issue 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

brsebas avatar Jun 08 '18 05:06 brsebas

Could you please try recreating the problem on CodeSandbox? https://codesandbox.io/s/kxlwyj7635

tw15egan avatar Jun 08 '18 15:06 tw15egan

I have recreated the issue . https://codesandbox.io/s/xl88zk1yz i want to see "5" on hover not "045"

brsebas avatar Jun 11 '18 10:06 brsebas

I see. For now, you can turn showLabels={false} and use the onHover to display your own tooltips

tw15egan avatar Jun 12 '18 15:06 tw15egan

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.

miukimiu avatar Jun 26 '18 16:06 miukimiu

🙏 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!

tw15egan avatar Jun 26 '18 18:06 tw15egan