Skip to content

Commit

Permalink
improve vizzu reference (#4739)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Skov Madsen <[email protected]>
  • Loading branch information
MarcSkovMadsen and Marc Skov Madsen authored May 2, 2023
1 parent 90acf17 commit 364336b
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions examples/reference/panes/Vizzu.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -17,15 +19,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The ``Vizzu`` pane renders [Vizzu](https://lib.vizzuhq.com/) charts inside Panel. Note that to use the ``Vizzu`` pane in the notebook the Panel extension has to be loaded with 'vizzu' as an argument to ensure that vizzu.js is initialized. \n",
"The ``Vizzu`` pane renders [Vizzu](https://lib.vizzuhq.com/) charts inside Panel. Note that to use the ``Vizzu`` pane in the notebook, the Panel extension has to be loaded with 'vizzu' as an argument to ensure that vizzu.js is initialized. \n",
"\n",
"#### Parameters:\n",
"\n",
"For layout and styling related parameters see the [customization user guide](../../user_guide/Customization.ipynb).\n",
"\n",
"* **``object``** (dict | pd.DataFrame): The data expressed as a Python dictionary of arrays or DataFrame.\n",
"* **``animation``** (dict): Animation settings (see https://lib.vizzuhq.com/latest/reference/modules/vizzu.Anim.html).\n",
"* **``config``** (dict): The config contains all of the parameters needed to render a particular static chart or a state of an animated chart (see https://lib.vizzuhq.com/latest/reference/interfaces/vizzu.Config.Chart.html).\n",
"* **``animation``** (dict): Animation settings (see [vizzu.Anim](https://lib.vizzuhq.com/latest/reference/modules/vizzu.Anim/)).\n",
"* **``config``** (dict): The config contains all of the parameters needed to render a particular static chart or a state of an animated chart (see [vizzu.Config.Chart](https://lib.vizzuhq.com/latest/reference/interfaces/vizzu.Config.Chart)).\n",
"* **``columns``** (list): Optional column definitions. If not defined will be inferred from the data.\n",
"\n",
"Methods:\n",
Expand Down Expand Up @@ -74,12 +76,25 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"vizzu.animate({'geometry': 'circle'})"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"vizzu.animate({'geometry': 'area'})"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -90,7 +105,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"print(vizzu.config)\n",
Expand All @@ -117,7 +134,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"df = pd.DataFrame(np.random.randn(50), columns=list('Y')).cumsum()\n",
Expand All @@ -140,7 +159,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"windturbines = pd.read_csv('https://datasets.holoviz.org/windturbines/v1/windturbines.csv')\n",
Expand Down Expand Up @@ -182,7 +203,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"pn.Row(vizzu.controls(jslink=True), vizzu)"
Expand Down

0 comments on commit 364336b

Please sign in to comment.