-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to zoom on mobile ? #47
Comments
Hi Yormi, thanks for asking. I haven't tried it on a mobile, but does this work (creating a selection and binding it to the position scales, from. basic12 : Spec
basic12 =
let
enc =
encoding
<< position X [ PName "income", PmType Quantitative, PScale [ SType ScLog ] ]
<< position Y [ PName "health", PmType Quantitative, PScale [ SZero False ] ]
<< size [ MName "population", MmType Quantitative ]
<< color [ MString "#000" ]
sel =
selection << select "view" Interval [ BindScales ]
in
toVegaLite
[ width 500
, height 300
, dataFromUrl "https://vega.github.io/vega-lite/data/gapminder-health-income.csv" []
, mark Circle []
, enc []
, sel []
] |
Wow ! Such a quick reply, thanks ! Just tried it. Didn't work. I would have been surprised otherwise since it's pretty much the setting that I have right now. It works great on desktop but no luck on mobile. It seems that the event hook "wheel" is not the same than the pinch gesture as it is in html. The way they handle the pinch-zoom in the example above seems way more complicated and uses signals (which are not available in vega-lite, right ?). I tried to add the Any other ideas ? |
It looks like we may be out of luck for the moment. However, we will be resuming work on getting Vega integrated with the package, at which point we should have a solution. But this is likely to be a few weeks away I afraid. |
Ah, well, I'll be patient. It's good to know that there is some work plan to integrate Vega. I was seeing the task of making some kind of a dashboard page with graphs daunting. So far even with the limitations of the package (and vega-lite) it was surprisingly pleasant. The simplicity of the vega specs with the elm type system was totally worth the limitations. I'll be patient for a solution for the mobile zoom. Thank you again :) |
Hi there !
I found this link of a vega example to zoom on pinch gesture but I'm not sure how I can translate into elm-vega.
Is it possible at all ?
Thanks
The text was updated successfully, but these errors were encountered: