Skip to content

Commit

Permalink
fix: modify document of appearance param
Browse files Browse the repository at this point in the history
  • Loading branch information
longxiaofei committed Jun 12, 2024
1 parent 8ed2865 commit ab6c557
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ renderer.explorer()
| field_specs | Optional[Dict[str, FieldSpec]] | None | Specifications of fields. Will be automatically inferred from `dataset` if not specified. |
| hide_data_source_config | bool | True | If True, hides DataSource import and export button. |
| theme_key | Literal['vega', 'g2'] | 'g2' | Theme type for the GraphicWalker. |
| dark | Literal['media', 'light', 'dark'] | 'media' | Theme setting. 'media' will auto-detect the OS theme. |
| appearance | Literal['media', 'light', 'dark'] | 'media' | Theme setting. 'media' will auto-detect the OS theme. |
| spec | str | "" | Chart configuration data. Can be a configuration ID, JSON, or remote file URL. |
| use_preview | bool | True | If True, uses the preview function. |
| kernel_computation | bool | False | If True, uses kernel computation for data. |
Expand Down
2 changes: 1 addition & 1 deletion docs/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Kargs:
- env: (Literal['Jupyter' | 'Streamlit'], optional): The enviroment using pygwalker. Default as 'Jupyter'
- hide_data_source_config (bool, optional): Hide DataSource import and export button (True) or not (False). Default to True
- theme_key ('vega' | 'g2'): theme type.
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- return_html (bool, optional): Directly return a html string. Defaults to False.
File: /usr/local/lib/python3.9/dist-packages/pygwalker/gwalker.py
Type: function
Expand Down
2 changes: 1 addition & 1 deletion pygwalker/api/gradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_html_on_gradio(
- env: (Literal['Jupyter' | 'Streamlit'], optional): The enviroment using pygwalker. Default as 'Jupyter'
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
- theme_key ('vega' | 'g2' | 'streamlit'): theme type.
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- spec (str): chart config data. config id, json, remote file url
- spec_io_mode (ISpecIOMode): spec io mode, Default to "r", "r" for read, "rw" for read and write.
- kernel_computation(bool): Whether to use kernel compute for datas, Default to True.
Expand Down
10 changes: 5 additions & 5 deletions pygwalker/api/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _to_html(
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
- spec (str): chart config data. config id, json, remote file url
- theme_key ('vega' | 'g2' | 'streamlit'): theme type.
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
"""
check_expired_params(kwargs)

Expand Down Expand Up @@ -95,7 +95,7 @@ def to_html(
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
- spec (str): chart config data. config id, json, remote file url
- theme_key ('vega' | 'g2'): theme type.
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
- default_tab (Literal["data", "vis"]): default tab to show. Default to "vis"
"""
return _to_html(
Expand Down Expand Up @@ -125,7 +125,7 @@ def to_table_html(
Kargs:
- theme_key ('vega' | 'g2'): theme type.
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
"""
return _to_html(
df,
Expand Down Expand Up @@ -155,7 +155,7 @@ def to_render_html(
Kargs:
- theme_key ('vega' | 'g2'): theme type.
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
"""
return _to_html(
df,
Expand Down Expand Up @@ -187,7 +187,7 @@ def to_chart_html(
Kargs:
- spec_type (Literal["graphic-walker", "vega"]): type of spec.
- theme_key ('vega' | 'g2'): theme type.
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
"""
# pylint: disable=import-outside-toplevel
# Since the compatibility of quick js is not certain, the related methods are lazy loaded.
Expand Down
7 changes: 3 additions & 4 deletions pygwalker/api/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def walk(
env: Literal['Jupyter', 'JupyterWidget'] = 'JupyterWidget',
field_specs: Optional[List[FieldSpec]] = None,
theme_key: IThemeKey = 'g2',
# alias for appearance, dark is deprecated, please use appearance instead
appearance: IAppearance = 'media',
spec: str = "",
use_kernel_calc: Optional[bool] = None,
Expand All @@ -42,7 +41,7 @@ def walk(
- env: (Literal['Jupyter' | 'JupyterWidget'], optional): The enviroment using pygwalker. Default as 'JupyterWidget'
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
- theme_key ('vega' | 'g2' | 'streamlit'): theme type.
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- spec (str): chart config data. config id, json, remote file url
- use_kernel_calc(bool): Whether to use kernel compute for datas, Default to None, automatically determine whether to use kernel calculation.
- kanaries_api_key (str): kanaries api key, Default to "".
Expand Down Expand Up @@ -117,7 +116,7 @@ def render(
Kargs:
- theme_key ('vega' | 'g2'): theme type.
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- kernel_computation(bool): Whether to use kernel compute for datas, Default to None.
- kanaries_api_key (str): kanaries api key, Default to "".
"""
Expand Down Expand Up @@ -160,7 +159,7 @@ def table(
Kargs:
- theme_key ('vega' | 'g2'): theme type.
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- kernel_computation(bool): Whether to use kernel compute for datas, Default to None.
- kanaries_api_key (str): kanaries api key, Default to "".
"""
Expand Down
4 changes: 2 additions & 2 deletions pygwalker/api/streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(
Kargs:
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
- theme_key ('vega' | 'g2'): theme type.
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- spec (str): chart config data. config id, json, remote file url
- spec_io_mode (ISpecIOMode): spec io mode, Default to "r", "r" for read, "rw" for read and write.
- kernel_computation(bool): Whether to use kernel compute for datas, Default to True.
Expand Down Expand Up @@ -301,7 +301,7 @@ def get_streamlit_html(
Kargs:
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
- theme_key ('vega' | 'g2'): theme type.
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
- spec (str): chart config data. config id, json, remote file url
- kernel_computation(bool): Whether to use kernel compute for datas, Default to None.
- use_kernel_calc(bool): Deprecated, use kernel_computation instead.
Expand Down
2 changes: 1 addition & 1 deletion tests/main-modin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
" from modin import pandas as pd\n",
" import pygwalker as pyg\n",
" df = pd.read_csv('./bike_sharing_dc.csv',parse_dates=['date'])\n",
" pyg.walk(df, theme_key='vega', dark='dark')"
" pyg.walk(df, theme_key='vega', appearance='dark')"
]
},
{
Expand Down

0 comments on commit ab6c557

Please sign in to comment.