We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Having just gone through this with a project at work, here's some additional items that could be added for charting interactions with vega-embed:
this.viewPromise = vegaEmbed(container, spec, { renderer: "svg", actions: false, tooltip: { theme: "custom_theme", formatTooltip: (datum, sanitize) => ` <span class="tooltip-inner another-class"> <span class="primary">${sanitize(datum.date)}</span> <strong class="secondary">${sanitize(datum.count)}</strong> </span>`, }, })
You'd need the additional VegaLite code in your LiveView code to handle tooltip data things.
VegaLite
In addition, you might want to add a destroyed event to handle cleanup..
destroyed
destroyed() { if (this.viewPromise) { this.viewPromise.then((view) => view.finalize()); } },
Hope that helps!
The text was updated successfully, but these errors were encountered:
Wanted to keep it as a really simple example but can add it later 👍
Sorry, something went wrong.
No branches or pull requests
Having just gone through this with a project at work, here's some additional items that could be added for charting interactions with vega-embed:
You'd need the additional
VegaLite
code in your LiveView code to handle tooltip data things.In addition, you might want to add a
destroyed
event to handle cleanup..Hope that helps!
The text was updated successfully, but these errors were encountered: