Last active
May 5, 2020 06:51
-
-
Save bkamapantula/a607c19a3cb8f7adf9186cedf8c09474 to your computer and use it in GitHub Desktop.
update vega chart data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// where data is a JSON object | |
let changeset = vega.changeset().remove(() => true).insert(data) | |
view.change('table', changeset) | |
.run() | |
// and where view is | |
view = new vega.View(vega.parse(spec)) | |
.renderer('svg') | |
.logLevel(vega.Warn) | |
.initialize('chart-container') | |
.hover() | |
.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment