Closed JeevankumarDharmalingam closed 1 year ago
spec="./chart_meta_0.json", # this json file will save your chart state, you need to click save button in ui mannual when you finish a chart, 'autosave' will be supported in the future. Like i want to reload the old charts when we select the same dataset again, this is not happening
Is ./chart_meta_0.json
written correctly?
Or can you tell me your steps of using pygwalker?
init_streamlit_comm()
# When using `use_kernel_calc=True`, you should cache your pygwalker html, if you don't want your memory to explode
@st.cache_resource
def get_pyg_html(df: pd.DataFrame) -> str:
# When you need to publish your application, you need set `debug=False`,prevent other users to write your config file.
html = get_streamlit_html(df, spec="./gw0.json", use_kernel_calc=True, debug=True,themekey='vega')
return html
@st.cache_data
def get_df() -> pd.DataFrame:
return st.session_state.df
if('df' in st.session_state):
df = get_df()
components.html(get_pyg_html(df), width=1300, height=1000, scrolling=True)
Can we integrate this to react application or do we need to use graphic walker ?
init_streamlit_comm() # When using `use_kernel_calc=True`, you should cache your pygwalker html, if you don't want your memory to explode @st.cache_resource def get_pyg_html(df: pd.DataFrame) -> str: # When you need to publish your application, you need set `debug=False`,prevent other users to write your config file. html = get_streamlit_html(df, spec="./gw0.json", use_kernel_calc=True, debug=True,themekey='vega') return html @st.cache_data def get_df() -> pd.DataFrame: return st.session_state.df if('df' in st.session_state): df = get_df() components.html(get_pyg_html(df), width=1300, height=1000, scrolling=True)
I'll try to reproduce it later
Can we integrate this to react application or do we need to use graphic walker ?
We recommend you to use graphic walker to customize your own needs and apis.
But the feature use_kernal_calc = True will work in Graphic Walker , I mean how to handle the computation for large dataset in Graphic walker Thanks in advance !!!
coding your custom computation function, you can request api to get datas.
<GraphicWalker ... computation={computationCallback} ... />
in server end, use gw-dsl-parser convert workflow to sql.
In pygwalker if want the visualization to be layout mode to be fixed always can be done in code
Also found need update when i set config privacy to meta , how to add up the external server information, or it will be your server
Also found need update when i set config privacy to meta , how to add up the external server information, or it will be your server
I don't understand what you mean. If you don't want to get updated information, set privacy to offline.
what mean how to add up the external server information
?
I mean if set privacy='meta' where my computations will be happening , if answer is on my server then how to set up connection params
If you develop a custom server, you should use graphic-walker to connect to your server, instead of pygwalker.
In addition, all feature of datas and computations in pygwalker all occur in your own python process and will not communicate with kananries' server.
pyg.walk(df, debug=True)
refer: https://github.com/Kanaries/pygwalker/releases/tag/0.3.7