Skip to content

Commit ab6c557

Browse files
committed
fix: modify document of appearance param
1 parent 8ed2865 commit ab6c557

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ renderer.explorer()
191191
| field_specs | Optional[Dict[str, FieldSpec]] | None | Specifications of fields. Will be automatically inferred from `dataset` if not specified. |
192192
| hide_data_source_config | bool | True | If True, hides DataSource import and export button. |
193193
| theme_key | Literal['vega', 'g2'] | 'g2' | Theme type for the GraphicWalker. |
194-
| dark | Literal['media', 'light', 'dark'] | 'media' | Theme setting. 'media' will auto-detect the OS theme. |
194+
| appearance | Literal['media', 'light', 'dark'] | 'media' | Theme setting. 'media' will auto-detect the OS theme. |
195195
| spec | str | "" | Chart configuration data. Can be a configuration ID, JSON, or remote file URL. |
196196
| use_preview | bool | True | If True, uses the preview function. |
197197
| kernel_computation | bool | False | If True, uses kernel computation for data. |

docs/README.zh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Kargs:
189189
- env: (Literal['Jupyter' | 'Streamlit'], optional): The enviroment using pygwalker. Default as 'Jupyter'
190190
- hide_data_source_config (bool, optional): Hide DataSource import and export button (True) or not (False). Default to True
191191
- theme_key ('vega' | 'g2'): theme type.
192-
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
192+
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
193193
- return_html (bool, optional): Directly return a html string. Defaults to False.
194194
File: /usr/local/lib/python3.9/dist-packages/pygwalker/gwalker.py
195195
Type: function

pygwalker/api/gradio.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get_html_on_gradio(
3838
- env: (Literal['Jupyter' | 'Streamlit'], optional): The enviroment using pygwalker. Default as 'Jupyter'
3939
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
4040
- theme_key ('vega' | 'g2' | 'streamlit'): theme type.
41-
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
41+
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
4242
- spec (str): chart config data. config id, json, remote file url
4343
- spec_io_mode (ISpecIOMode): spec io mode, Default to "r", "r" for read, "rw" for read and write.
4444
- kernel_computation(bool): Whether to use kernel compute for datas, Default to True.

pygwalker/api/html.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _to_html(
4040
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
4141
- spec (str): chart config data. config id, json, remote file url
4242
- theme_key ('vega' | 'g2' | 'streamlit'): theme type.
43-
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
43+
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
4444
"""
4545
check_expired_params(kwargs)
4646

@@ -95,7 +95,7 @@ def to_html(
9595
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
9696
- spec (str): chart config data. config id, json, remote file url
9797
- theme_key ('vega' | 'g2'): theme type.
98-
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
98+
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
9999
- default_tab (Literal["data", "vis"]): default tab to show. Default to "vis"
100100
"""
101101
return _to_html(
@@ -125,7 +125,7 @@ def to_table_html(
125125
126126
Kargs:
127127
- theme_key ('vega' | 'g2'): theme type.
128-
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
128+
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
129129
"""
130130
return _to_html(
131131
df,
@@ -155,7 +155,7 @@ def to_render_html(
155155
156156
Kargs:
157157
- theme_key ('vega' | 'g2'): theme type.
158-
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
158+
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
159159
"""
160160
return _to_html(
161161
df,
@@ -187,7 +187,7 @@ def to_chart_html(
187187
Kargs:
188188
- spec_type (Literal["graphic-walker", "vega"]): type of spec.
189189
- theme_key ('vega' | 'g2'): theme type.
190-
- dark ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
190+
- appearance ('media' | 'light' | 'dark'): 'media': auto detect OS theme.
191191
"""
192192
# pylint: disable=import-outside-toplevel
193193
# Since the compatibility of quick js is not certain, the related methods are lazy loaded.

pygwalker/api/jupyter.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def walk(
2121
env: Literal['Jupyter', 'JupyterWidget'] = 'JupyterWidget',
2222
field_specs: Optional[List[FieldSpec]] = None,
2323
theme_key: IThemeKey = 'g2',
24-
# alias for appearance, dark is deprecated, please use appearance instead
2524
appearance: IAppearance = 'media',
2625
spec: str = "",
2726
use_kernel_calc: Optional[bool] = None,
@@ -42,7 +41,7 @@ def walk(
4241
- env: (Literal['Jupyter' | 'JupyterWidget'], optional): The enviroment using pygwalker. Default as 'JupyterWidget'
4342
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
4443
- theme_key ('vega' | 'g2' | 'streamlit'): theme type.
45-
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
44+
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
4645
- spec (str): chart config data. config id, json, remote file url
4746
- use_kernel_calc(bool): Whether to use kernel compute for datas, Default to None, automatically determine whether to use kernel calculation.
4847
- kanaries_api_key (str): kanaries api key, Default to "".
@@ -117,7 +116,7 @@ def render(
117116
118117
Kargs:
119118
- theme_key ('vega' | 'g2'): theme type.
120-
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
119+
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
121120
- kernel_computation(bool): Whether to use kernel compute for datas, Default to None.
122121
- kanaries_api_key (str): kanaries api key, Default to "".
123122
"""
@@ -160,7 +159,7 @@ def table(
160159
161160
Kargs:
162161
- theme_key ('vega' | 'g2'): theme type.
163-
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
162+
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
164163
- kernel_computation(bool): Whether to use kernel compute for datas, Default to None.
165164
- kanaries_api_key (str): kanaries api key, Default to "".
166165
"""

pygwalker/api/streamlit.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(
7878
Kargs:
7979
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
8080
- theme_key ('vega' | 'g2'): theme type.
81-
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
81+
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
8282
- spec (str): chart config data. config id, json, remote file url
8383
- spec_io_mode (ISpecIOMode): spec io mode, Default to "r", "r" for read, "rw" for read and write.
8484
- kernel_computation(bool): Whether to use kernel compute for datas, Default to True.
@@ -301,7 +301,7 @@ def get_streamlit_html(
301301
Kargs:
302302
- field_specs (List[FieldSpec], optional): Specifications of some fields. They'll been automatically inferred from `df` if some fields are not specified.
303303
- theme_key ('vega' | 'g2'): theme type.
304-
- dark (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
304+
- appearance (Literal['media' | 'light' | 'dark']): 'media': auto detect OS theme.
305305
- spec (str): chart config data. config id, json, remote file url
306306
- kernel_computation(bool): Whether to use kernel compute for datas, Default to None.
307307
- use_kernel_calc(bool): Deprecated, use kernel_computation instead.

tests/main-modin.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
" from modin import pandas as pd\n",
1313
" import pygwalker as pyg\n",
1414
" df = pd.read_csv('./bike_sharing_dc.csv',parse_dates=['date'])\n",
15-
" pyg.walk(df, theme_key='vega', dark='dark')"
15+
" pyg.walk(df, theme_key='vega', appearance='dark')"
1616
]
1717
},
1818
{

0 commit comments

Comments
 (0)