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

Interactive (jsfiddle like) tutorial and the examples #106

Open
petervidos opened this issue Apr 4, 2022 · 3 comments
Open

Interactive (jsfiddle like) tutorial and the examples #106

petervidos opened this issue Apr 4, 2022 · 3 comments

Comments

@petervidos
Copy link
Member

https://jupyterlite.github.io/demo/lab/index.html
https://blog.jupyter.org/jupyter-everywhere-f8151c2cc6e8

@veghdev
Copy link
Member

veghdev commented Apr 8, 2022

@petervidos Could you please clarify the issue?
ipyvizzu works in jupyterLite, for example:

  1. cell:
import micropip
await micropip.install("ipyvizzu")

from ipyvizzu import Chart, Data, Config

chart = Chart()
chart.scroll_into_view = False

data_cube = Data()

data_cube.add_dimension('Genres', [ 'Pop', 'Rock', 'Jazz', 'Metal'])
data_cube.add_dimension('Kinds', [ 'Hard', 'Smooth', 'Experimental' ])

data_cube.add_measure(
    'Popularity',
    [
        [114, 96, 78, 52],
        [56, 36, 174, 121],
        [127, 83, 94, 58],
    ]
)

chart.animate(data_cube)

chart.animate(Config({
    "channels": {
        "y": {
            "set": ["Popularity", "Kinds"]
        }, 
        "x": {
            "set": "Genres"
        },
        "label": {
            "attach": "Popularity"
        }
    },
    "color": {
        "attach": "Kinds"
    },
    "title": "Stack"
}))

chart.animate(Config({
    "channels": {
        "y": {
            "attach": "Genres",
        },
        "x": {
            "set": None
        }
    }
}))

snapshot1 = chart.store()
  1. cell:
chart.animate(snapshot1)

chart.animate(Config({"title": "Aggregate element"}))

chart.animate(Config({
    "channels": {
        "y": {
            "detach": "Genres",
        },
    }
}))

snapshot2 = chart.store()

@simzer
Copy link
Member

simzer commented Apr 8, 2022

I think Peter would like to see something like the js fiddles for the JS library examples with a tryit link.

@veghdev veghdev added the documentation Improvements or additions to documentation label Apr 9, 2022
@schaumb schaumb changed the title Let's use Jupyter Lite for the tutorial and the examples Interactive (jsfiddle like) tutorial and the examples Jul 3, 2023
@schaumb schaumb removed the documentation Improvements or additions to documentation label Jul 3, 2023
@simzer
Copy link
Member

simzer commented Sep 5, 2023

Naas could support this doc site feature

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

4 participants