Skip to content

Commit 47ae4f9

Browse files
committed
update & format
1 parent eaf9248 commit 47ae4f9

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

chartlets.py/CHANGES.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
## Version 0.1.0 (in development)
22

3+
34
* Reorganised Chartlets project to better separate demo from library code.
45
Created separate folder `demo` in `chartlets.py` that contains
5-
a `server` package and example configuration.
6+
a demo `server` package and example configuration.
7+
Also simplified demo server code:
8+
- Moved `panel` module one level up
9+
- Removed `util` module which was no longer required
610

7-
* Allow for different chart providers. `VegaChart` is defined only if
8-
`vega-altair` is installed.
11+
* Allow for different chart providers. `VegaChart` can be configured only if
12+
`altair` package is installed.
913

1014
* Renamed `Plot` into `VegaChart`, which now also respects a `theme` property.
1115

chartlets.py/chartlets/components/charts/vega.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dataclasses import dataclass
22
from typing import Any
3-
3+
import warnings
44

55
# Respect that "altair" is an optional dependency.
66
try:
@@ -9,6 +9,7 @@
99

1010
AltairChart = altair.Chart
1111
except ImportError:
12+
warnings.warn("you must install 'altair' to use the VegaChart component")
1213
AltairChart = type(None)
1314

1415
from chartlets import Component

chartlets.py/demo/my_extension/my_panel_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from chartlets.components import VegaChart, Box, Select
55

66
from server.context import Context
7-
from server.panel import (Panel)
7+
from server.panel import Panel
88

99

1010
panel = Panel(__name__, title="Panel B")

0 commit comments

Comments
 (0)