gradio/demo/lineplot_component/run.py
Freddy Boulton 51157d7410
Adding a LinePlot component demo to the docs (#2868)
* Add gradio demo

* Add linplot component notebook

* Link live_dashboard to LinePlot

* Fix notebooks + lint
2022-12-20 20:27:21 -05:00

22 lines
449 B
Python

import gradio as gr
from vega_datasets import data
with gr.Blocks() as demo:
gr.LinePlot(
data.stocks(),
x="date",
y="price",
color="symbol",
color_legend_position="bottom",
title="Stock Prices",
tooltip=["date", "price", "symbol"],
height=300,
width=500,
show_label=False,
).style(
container=False,
)
if __name__ == "__main__":
demo.launch()