DOI-USGS / water-use

Visualization using USGS water use data.
https://owi.usgs.gov/vizlab/water-use/
Creative Commons Zero v1.0 Universal
15 stars 16 forks source link

Losing hover on bar...sometimes #165

Closed ldecicco-USGS closed 7 years ago

ldecicco-USGS commented 7 years ago

I'll try to figure out the pattern.

ldecicco-USGS commented 7 years ago

First, hover over map, all's good. Click on something anything,, then come back and try hovering over the current year's bar, no hover.

wdwatkins commented 7 years ago

Is this that transparent mouse overlay @jread-usgs mentioned in his talk?

jiwalker-usgs commented 7 years ago

This is introduced by the mobile fix to hide tooltips at certain points due to (click and scroll). The tooltip library should maybe be swapped out for something that is less finicky.

jordansread commented 7 years ago

@jiwalker-usgs can/should we just replace those bars w/ svg rects? then we can just use the same tip functions. If we set the base of the rectangle relative to 0 in y-space, we can scale y as scale3d(1, yscale,1)

like

<g transform="translate(200, 100)">
   <rect x="-5" y="-100" height="100" width="10" id="rect-1"/>
   <circle r='2' fill='red'/>
</g>

image

scale relative to the baseline (that red dot):

document.getElementById('rect-1').setAttribute('transform','scale(1,0.4)');

image

jiwalker-usgs commented 7 years ago

Yeah, that is probably a good way to go. Can tooltips extend outside of the extent of the svg area?

jordansread commented 7 years ago

No, they can't @jiwalker-usgs . Good point. But, I would suggest if we do this we just extend the svg and add the bars on the bottom. Might need to do this anyways if we take on the more complicated solution of #166

jiwalker-usgs commented 7 years ago

yeah, makes sense to me

jordansread commented 7 years ago

I don't think it makes sense to convert this to svg unless we are doing #166.

jordansread commented 7 years ago

@ldecicco-USGS is this bad enough to put the priority tag on it?

ldecicco-USGS commented 7 years ago

It's a bit weird. But, I think we could release without the fix.

jiwalker-usgs commented 7 years ago

188 should fix

lindsayplatt commented 7 years ago

Seems to work for me @jiwalker-usgs !