queryverse / ElectronDisplay.jl

An Electron.jl based figure and table display.
Other
85 stars 17 forks source link

Vega-Lite `angle` mark property channel is not rendered correctly in ElectronDisplay.jl #88

Open lassepe opened 3 years ago

lassepe commented 3 years ago

Similar to #83, I'm not sure whether this considere a VegaLite.jl bug or EletronDisplay.jl bug. Please move this issue to VegaLite.jl if you think it is more suitably hosted there.

When trying to reproduce the Wind Vector Map Example in VegaLite.jl I noticed that the angle property is not rendered correctly in ElectronDisplay.jl.

This code can be used to reproduce the issue:

using VegaLite: @vlplot
import VegaDatasets

data = VegaDatasets.dataset("windvectors")

data |> @vlplot(
    mark = {:point, shape = "wedge", filled = true, size = 1000} ,
    longitude = {:longitude, type = "quantitative",},
    latitude = {:latitude, type = "quantitative"},
    color = {
        :dir,
        type = "quantitative",
        scale = {domain = [0, 360], scheme = "rainbow"},
        legend = nothing,
    },
    angle = {:dir, type = "quantitative", scale = {domain = [0, 360], range = [180, 540]}},
    size = {:speed, scale = {range = [50, 500]}},
    width = 1000,
    height = 1000,
    config = {aria = false, view = {step = 10, fill = "black"}}
)

In Chrome/Chromium/Firefox this correctly renders the wind map: image

Whey displayed via ElectronDisplay.jl the same code yields a plot that ignores the angle property channel:

visualization

davidanthoff commented 3 years ago

I think the problem is that we haven't updated the version of vega-lite that we ship in ElectronDisplay.jl in a while... I'll try and see whether we can somewhat easily update!

lassepe commented 3 years ago

Thank you for your help! I was not aware that ElectroDisplay.jl ships it's own vega-lite version. I had always assumed it would just download it and work essentialy the same way as a browser.