Skip to content

Commit

Permalink
Also do it for streaming examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Jan 22, 2025
1 parent 8135b7c commit fe6bf48
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions doc/how_to/callbacks/examples/streaming_bokeh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Streaming Bokeh

```{pyodide}
```python
import numpy as np
import panel as pn

Expand All @@ -12,7 +12,7 @@ pn.extension(template='fast')

This example demonstrates how to use `add_periodic_callback` to stream data to a Bokeh plot.

```{pyodide}
```python
p = figure(sizing_mode='stretch_width', title='Bokeh streaming example')

xs = np.arange(1000)
Expand Down
4 changes: 2 additions & 2 deletions doc/how_to/callbacks/examples/streaming_indicator.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Streaming Indicator

```{pyodide}
```python
import numpy as np
import panel as pn

Expand All @@ -9,7 +9,7 @@ pn.extension(template='fast')

This example demonstrates how to use `add_periodic_callback` to stream data to the `Trend` indicator.

```{pyodide}
```python
layout = pn.layout.FlexBox(*(
pn.indicators.Trend(
data={'x': list(range(10)), 'y': np.random.randn(10).cumsum()},
Expand Down
4 changes: 2 additions & 2 deletions doc/how_to/callbacks/examples/streaming_perspective.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Streaming Perspective

```{pyodide}
```python
import numpy as np
import pandas as pd
import panel as pn
Expand All @@ -10,7 +10,7 @@ pn.extension('perspective', template='fast', sizing_mode='stretch_width')

This example demonstrates how to use `add_periodic_callback` to stream data to a `Perspective` pane.

```{pyodide}
```python
df = pd.DataFrame(np.random.randn(10, 4), columns=list('ABCD')).cumsum()

rollover = pn.widgets.IntInput(name='Rollover', value=15)
Expand Down
4 changes: 2 additions & 2 deletions doc/how_to/callbacks/examples/streaming_tabulator.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Streaming Tabulator

```{pyodide}
```python
import numpy as np
import pandas as pd
import panel as pn
Expand All @@ -10,7 +10,7 @@ pn.extension('tabulator', template='fast', sizing_mode="stretch_width")

This example demonstrates how to use `add_periodic_callback` to stream data to a `Tabulator` pane.

```{pyodide}
```python
df = pd.DataFrame(np.random.randn(10, 4), columns=list('ABCD')).cumsum()

rollover = pn.widgets.IntInput(name='Rollover', value=15)
Expand Down

0 comments on commit fe6bf48

Please sign in to comment.