Skip to content
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

Assign variables request #524

Open
apb-reports opened this issue Dec 16, 2024 · 0 comments
Open

Assign variables request #524

apb-reports opened this issue Dec 16, 2024 · 0 comments

Comments

@apb-reports
Copy link

When using vega lite with javascript (web apps etc) I can easily pull a value into a variable/cont and place this in the vega lite spec and the spec uses the value. For example if I wanted to dynamically assign the Height step I could do this:

const V5Data = myDataSource;
const rowCount = V5Data.length;
const stepSize = rowCount < 4 ? 30 : 20;

var V5Spec = {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"values": V5Data},
"width": "container",
"height": {"step": stepSize}....

I was hoping you could consider adding some code so we could do this in Deneb.
For example if we wrapped a value like [[xxxx]] in double brackets you could obtain the actual value and not the name of the field/measure. This would make for some very dynamic charts and remove much of the complexity often used with transforms etc.

Just an idea for future development.

Keep up the amazing work Daniel!

Untitled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant