Skip to content

Commit

Permalink
Rename package to 'shinyecharts'
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kuethe committed Feb 9, 2024
1 parent 499f417 commit e3f2199
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 20 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pip install git+https://github.com/eodaGmbH/py-shiny-echarts
## Basic usage

```python
from echarts4py.chart import Chart, InitOptions
from echarts4py.options import Line
from echarts4py.renderer import ChartRenderer
from shinyecharts.chart import Chart, InitOptions
from shinyecharts.options import Line
from shinyecharts.renderer import ChartRenderer
from pandas import DataFrame

# Must always be imported, otherwise App is not found
Expand All @@ -31,7 +31,6 @@ data = DataFrame(
columns=["a", "b", "c", "d"],
)


lines = (
Line(x="a", y="b", tooltip=dict(trigger="axis"), legend=dict())
.add_series("c")
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/getting_started/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from echarts4py.chart import Chart, InitOptions
from echarts4py.renderer import ChartRenderer
from pandas import DataFrame
from shiny.express import ui
from shinyecharts.chart import Chart, InitOptions
from shinyecharts.renderer import ChartRenderer

options = InitOptions(width=600, height=400)

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/getting_started/basic_usage.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from echarts4py.chart import Chart, InitOptions
from echarts4py.options import Line
from echarts4py.renderer import ChartRenderer
from pandas import DataFrame

# Must always be imported, otherwise App is not found
from shiny.express import ui
from shinyecharts.chart import Chart, InitOptions
from shinyecharts.options import Line
from shinyecharts.renderer import ChartRenderer

init_options = InitOptions(width=600, height=400, renderer="canvas")

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/getting_started/basic_usage_express.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from echarts4py.chart import Chart, InitOptions
from echarts4py.options import Bar, ChartOption, Line, Pie, Scatter
from echarts4py.renderer import ChartRenderer
from pandas import DataFrame

# Must always be imported, otherwise App is not found
from shiny.express import ui
from shinyecharts.chart import Chart, InitOptions
from shinyecharts.options import Bar, ChartOption, Line, Pie, Scatter
from shinyecharts.renderer import ChartRenderer

# General options
options = InitOptions(width=600, height=400, renderer="canvas")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions echarts4py/experimental.py → shinyecharts/experimental.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from echarts4py._core import BaseOption
from echarts4py.options import ChartOption
from shinyecharts._core import BaseOption
from shinyecharts.options import ChartOption

# "boundaryGap": False,
# "splitLine": {"show": True},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion echarts4py/ui.py → shinyecharts/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
echarts_bindings_dep = HTMLDependency(
"echarts-bindings",
version="1.0.0",
source={"package": "echarts4py", "subdir": "srcjs"},
source={"package": "shinyecharts", "subdir": "srcjs"},
script={"src": "echarts-bindings.js", "type": "module"},
all_files=False,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_chart.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from echarts4py.chart import Chart, InitOptions
from echarts4py.options import Pie
from shinyecharts.chart import Chart, InitOptions
from shinyecharts.options import Pie


def test_chart():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_chart_option.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from echarts4py.options import ChartOption
from shinyecharts.options import ChartOption


def test_chart_options():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_options.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from echarts4py.options import Bar, Line, Pie, Scatter
from pandas import DataFrame
from shinyecharts.options import Bar, Line, Pie, Scatter


def test_bar():
Expand Down

0 comments on commit e3f2199

Please sign in to comment.