Altair: Interactive charts don't show correct result on load (but refresh after interaction)

Created on 17 Mar 2018  路  5Comments  路  Source: altair-viz/altair

I've noticed that various interactive elements don't render on load. This is best explained by an example ([US Population over time], copy/pasted from docs):

Here's screenshots of before and after I move the slider around (and leaving it in the same place it started):

| Before | After |
| :--:|:--:|
| screen shot 2018-03-17 at 12 27 13 pm | screen shot 2018-03-17 at 12 27 26 pm |

I'm on Altair 2.0.0rc1

bug vega-lite-related

All 5 comments

Yes, I've noticed this too. It has to do with the fact that in Vega-Lite selections start out empty, and so the slider doesn't take effect until you move it. The only options for an empty selection are "none" or "all", neither of which really fixes this issue.

Maybe @domoritz or @kanitw have ideas... when selections have bindings like the slider here, is there a way to initialize them such that they're consistent with the default state of the binding?

Paging @arvind who implemented the selections framework.

This is still an issue... and major enough that each time I try to start writing docs for bindings in altair I give up because they're essentially unusable in their current state.

Would it be worth opening a bug in Vega-Lite to track this more effectively?

Hi @jakevdp, we're tracking this issue as vega/vega-lite#3409 and vega/vega-lite#3431. I'll prioritize it and aim to have something land soon. Sorry about the frustration and the delay.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mroswell picture mroswell  路  4Comments

DentonGentry picture DentonGentry  路  3Comments

maxgerma picture maxgerma  路  3Comments

floringogianu picture floringogianu  路  3Comments

LukeMathWalker picture LukeMathWalker  路  3Comments