johnmyleswhite / Vega.jl

A Julia package for generating visualizations in Vega
Other
84 stars 22 forks source link

hover! color style persists on a lineplot after mouseoff #128

Closed ahwillia closed 8 years ago

ahwillia commented 8 years ago

I swear I'll track some of these problems down at some point rather than just opening up issues. This one will hopefully be a simple fix. Using the lineplot example from the documentation:

using Vega

x = [1:100; 1:100]
y = [[1:100] + randn(100); 3.0 + 1.5 * [1:100] + randn(100)]
group = [[1 for i in 1:100]; [2 for i in 1:100]]

v = lineplot(x = x, y = y, group = group)

hover!(v, color = "Red")

This produces a light blue and blue line for me. Then, when I mouseover they turn red (as I want them to). However, the color change persists as shown below:

screen shot 2016-04-20 at 4 03 24 pm

randyzwitch commented 8 years ago

Not at all, thank you for pointing it out! Given that vega.js itself is a moving target, it's not feasible for me to test every combination of plots and methods.

It should be pretty simple, I just need to reset the color on mouseoff. Hopefully I can find a few minutes today to do that.

randyzwitch commented 8 years ago

It worked for me for the plots that used this (lineplot, grouped bar and population). Will tag a new release, so you can just update using Pkg.update()

ahwillia commented 8 years ago

Nice, the fix works for me. I don't mind checking out the bleeding edge - just expect a lot of minor bug reports from me.