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

Add support for datasets #17

Merged
merged 1 commit into from
Sep 20, 2021
Merged

Add support for datasets #17

merged 1 commit into from
Sep 20, 2021

Conversation

jonatanklosko
Copy link
Member

Closes #16.

@dustinfarris if you have a use case for this feature, please test this branch and let me know if it gets you where you need :)

{:vega_lite, "~> 0.1.1", github: "livebook-dev/vega_lite", branch: "jk-datasets", override: true}

Example usage alternative to data_from_values:

Vl.new(width: 400, height: 400)
|> Vl.datasets_from_values(
  mydata: [
    %{iteration: 1, score: 1},
    %{iteration: 10, score: 10},
    %{iteration: 100, score: 100}
  ]
)
|> Vl.data(name: "mydata")
|> Vl.mark(:line)
|> Vl.encode_field(:x, "iteration", type: :quantitative)
|> Vl.encode_field(:y, "score", type: :quantitative)

@dustinfarris
Copy link

It works!

@jonatanklosko jonatanklosko merged commit bdf0fe2 into main Sep 20, 2021
@jonatanklosko jonatanklosko deleted the jk-datasets branch September 20, 2021 16:57
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

Successfully merging this pull request may close these issues.

multiple datasets
3 participants