react-spectrum-charts icon indicating copy to clipboard operation
react-spectrum-charts copied to clipboard

Request for Annotations feature for horizontal Bar Graphs

Open arushi474 opened this issue 1 year ago • 7 comments

Provide a general summary of the feature here

Annotations doesn't work for bar graph when orientation is horizontal.

🤔 Expected Behavior?

image

💁 Possible Solution

You can enable/build the annotaions to work for horizontal bar graph.

🔦 Context

image As you can see it is enabled for verical bar graphs, But the same doesn't work for horizontal bar graphs. As show below, image

💻 Examples

This is the required behaviour

image

🧢 Your Company/Team

Adobe/Connect

arushi474 avatar Apr 07 '24 18:04 arushi474

If you increase the height of your bar chart, do the annotations show up? We have something where if the width/height of the bar gets too small, the annotation won't show. Not saying it isn't a bug, just trying to troubleshoot a bit.

marshallpete avatar Apr 09 '24 16:04 marshallpete

Hey @marshallpete can you mention the specific height/width at which the annotations are hiden? I did explored the same by putting some values for the height/width prop in chart but could not get it to show the annotations for horizontal bar graph.

arushi474 avatar Apr 10 '24 10:04 arushi474

@arushi474 Sorry for the delay, I created another bug with more details and how to fix. I’ll fix this one next week. https://github.com/adobe/react-spectrum-charts/issues/268

marshallpete avatar Apr 27 '24 21:04 marshallpete

Thanks again for the thorough details. You’ll see in the other issue that the root cause is that we never properly setup annotations for horizontal bars. If the width of the bar is less than 48px, we hide the annotation. This should be updated so that with a horizontal bar, if the height of the bar is less than the height of the text, we hide the annotation.

marshallpete avatar Apr 27 '24 21:04 marshallpete

Hey @marshallpete by when can I expect this to be fixed?

arushi474 avatar May 02 '24 07:05 arushi474

I might have some time next week or it's open for contribution if you want to take a crack at it.

marshallpete avatar May 02 '24 17:05 marshallpete

Hi @marshallpete any update on this?

arushi474 avatar May 21 '24 07:05 arushi474

@arushi474 I started some discovery on this one. I have some solution ideas. There are a few additional edge cases I'm trying to solve. Starting 6/3 I'm going to have a whole week to tackle stuff like this and this item is one of 3 at the top of my list.

marshallpete avatar May 21 '24 21:05 marshallpete

@marshallpete any update on this?

arushi474 avatar Jun 19 '24 11:06 arushi474