rickshaw icon indicating copy to clipboard operation
rickshaw copied to clipboard

HoverDetail should expand in opposite direction at right side of graph

Open aimee-ault opened this issue 12 years ago • 3 comments

Currently the HoverDetail (both x-axis and y-axis) expands to right. This is fine until you get to the right-most edge of the graph and it then goes outside the bounds of the graph element.

This is potentially problematic in a few different situations, like if you have an element next to the graph that has a higher z-index... or, more problematic, if the graph is taking up a vast major of the page width, in which case, the hover detail disappears off the right side of the screen. It seems like it should maybe check for the width of the content being rendered and display it in the opposite direction if it can't be entirely rendered in the remaining space of the graph.

aimee-ault avatar Jan 15 '14 17:01 aimee-ault

Indeed -- this is fixed as of v1.4.5.

You can see the better/updated behavior here: http://code.shutterstock.com/rickshaw/examples/extensions.html

dchester avatar Jan 25 '14 16:01 dchester

Aha! It's reliant on a CSS class called .right. Thanks for pointing out that it is supported :+1:

aimee-ault avatar Jan 27 '14 02:01 aimee-ault

could you elaborate a bit more hwo to get behaviour of this tooltip like demonstrated in the example? I mean flexible behavioru once it is aligned right and once left.

does it need some extra JS or this css is enough: http://code.shutterstock.com/rickshaw/src/css/detail.css

andilabs avatar Aug 12 '14 09:08 andilabs