SandDance
SandDance copied to clipboard
Add dialog in Data Browser to change numeric columns' quantitativeness
See #270
Thanks for your contribution! I always appreciate a good PR 🥇
I think this change has implication on the History feature. A history entry may become invalid when a layout is dependent on a column type being quantitative, for example the Size role.
Also, the layout vegaSpec will need to be recomputed - so we will not be able to call viewer.onAnimateDataChange
. This is because there is a binning slider mechanism for layouts with quantitative band scales (Bar, Column, Density & Stacks):
So let's back out changes to viewer.ts
and instead of viewer.updateColumn()
, call explorer.load(). The .load()
method should be modified to accept an optional "columnTypes" mapping of some invention.
Now since we are calling .load()
this is a hard reset of the UI state, so I'll retract my need to have a "revert" capability and we should have a confirmation dialog with a message stating "this will erase your current history".
Lastly, look out for an upcoming merge as I've been working in some of the same files. 🙏
Sure, I'll try to have something out this weekend, I guess that explorer.load would reset the entire history stack too? Also it seems that we could integrate a column type choosing step in the load dataset flow as well, independent of whether the button in the data explorer was pressed.
Yes, explorer.load is a complete fresh start. As for the column type chooser in the opening flow, I'd rather have a visualization up as fast as possible, instead of a dialog as the primary experience.
Thanks for the work so far, @nik0sc. I am going to complete this PR as-is and complete the work as part of a new "data summary" component.