diff --git a/shinyecharts/chart.py b/shinyecharts/chart.py index 4a6daf2..f04b452 100644 --- a/shinyecharts/chart.py +++ b/shinyecharts/chart.py @@ -56,6 +56,7 @@ def set_data(self, data: DataFrame | dict) -> Chart: return self def add_series(self, series: dict) -> Chart: + """Add series attribute of option object""" if SeriesType(series["type"]).value == "bar": self._option["xAxis"] = dict(type="category") @@ -76,7 +77,7 @@ def encode( type: SeriesType | str = SeriesType.LINE, **kwargs, ) -> Chart: - """Add series to option object""" + """Add series attribute to option object""" series = dict(name=y, type=type, encode=dict(x=x, y=y)) | kwargs self.add_series(series) return self @@ -87,6 +88,7 @@ def set_option(self, option: dict | ChartOption | BaseOption) -> Chart: return self def to_dict(self) -> dict: + # TODO: Create dataset when setting 'self._data' dataset = ( df_to_dataset(self._data) if isinstance(self._data, DataFrame) else dict() ) diff --git a/shinyecharts/express.py b/shinyecharts/express.py index 2d28721..e87f3e1 100644 --- a/shinyecharts/express.py +++ b/shinyecharts/express.py @@ -1,3 +1,7 @@ +# ========================== +# TODO: Module is DEPRECATED +# ========================== + from __future__ import annotations from pandas import DataFrame