Skip to content

Commit

Permalink
updated document document
Browse files Browse the repository at this point in the history
  • Loading branch information
zen committed Dec 5, 2023
1 parent 74e591e commit 81776ea
Show file tree
Hide file tree
Showing 22 changed files with 106 additions and 22 deletions.
3 changes: 3 additions & 0 deletions change.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.6.21
- Added Funnel and Gantt chart for Highchart

# 0.6.20
- Allow user to select Button Type and Color in Button Data and allow inline css
```python
Expand Down
5 changes: 4 additions & 1 deletion docs/_modules/zen_dash/objects/instances.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ <h1>Source code for zen_dash.objects.instances</h1><div class="highlight"><pre>
<div class="viewcode-block" id="HighChartType"><a class="viewcode-back" href="../../../zen_dash.objects.html#zen_dash.objects.instances.HighChartType">[docs]</a><span class="k">class</span> <span class="nc">HighChartType</span><span class="p">(</span><span class="n">Enum</span><span class="p">):</span>
<span class="n">CHART</span> <span class="o">=</span> <span class="s2">&quot;chart&quot;</span>
<span class="n">STOCK</span> <span class="o">=</span> <span class="s2">&quot;stock&quot;</span>
<span class="n">MAP</span> <span class="o">=</span> <span class="s2">&quot;map&quot;</span></div>
<span class="n">MAP</span> <span class="o">=</span> <span class="s2">&quot;map&quot;</span>
<span class="n">Sankey</span> <span class="o">=</span> <span class="s2">&quot;sankey&quot;</span>
<span class="n">Funnel</span> <span class="o">=</span> <span class="s2">&quot;funnel&quot;</span>
<span class="n">Gantt</span> <span class="o">=</span> <span class="s2">&quot;gantt&quot;</span></div>

<div class="viewcode-block" id="HighChartData"><a class="viewcode-back" href="../../../zen_dash.objects.html#zen_dash.objects.instances.HighChartData">[docs]</a><span class="k">class</span> <span class="nc">HighChartData</span><span class="p">(</span><span class="n">BaseUpdate</span><span class="p">):</span>
<span class="nb">type</span><span class="p">:</span> <span class="n">HighChartType</span> <span class="o">=</span> <span class="n">HighChartType</span><span class="o">.</span><span class="n">CHART</span>
Expand Down
10 changes: 8 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ <h2 id="F">F</h2>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.ReactiveData.full_rective">full_rective (zen_dash.objects.instances.ReactiveData attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.Zen.full_url">full_url() (zen_dash.objects.Zen static method)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.HighChartType.Funnel">Funnel (zen_dash.objects.instances.HighChartType attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.flex_data.FlexData.fxFlex">fxFlex (zen_dash.objects.flex_data.FlexData attribute)</a>
</li>
Expand All @@ -407,6 +409,8 @@ <h2 id="F">F</h2>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.HighChartType.Gantt">Gantt (zen_dash.objects.instances.HighChartType attribute)</a>
</li>
<li><a href="zen_dash.tag.html#zen_dash.tag.TAG.get_id">get_id (zen_dash.tag.TAG property)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.sidebar.get_page_dict">get_page_dict() (in module zen_dash.objects.sidebar)</a>
Expand Down Expand Up @@ -858,6 +862,8 @@ <h2 id="R">R</h2>
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.HighChartType.Sankey">Sankey (zen_dash.objects.instances.HighChartType attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.CustomHTML.script">script (zen_dash.objects.instances.CustomHTML attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.scripts.CustomScripts.scripts">scripts (zen_dash.objects.scripts.CustomScripts attribute)</a>
Expand Down Expand Up @@ -913,11 +919,11 @@ <h2 id="S">S</h2>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.UpdateReturnData.simple_fitler_data">simple_fitler_data (zen_dash.objects.instances.UpdateReturnData attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.InstanceType.SIMPLE_SERVER_FILTER">SIMPLE_SERVER_FILTER (zen_dash.objects.instances.InstanceType attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.ReturnData.simple_server_filter_data">simple_server_filter_data (zen_dash.objects.instances.ReturnData attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.ReturnData.simple_server_filter_data">simple_server_filter_data (zen_dash.objects.instances.ReturnData attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.SimpleFilterData">SimpleFilterData (class in zen_dash.objects.instances)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.SimpleServerSideFilterData">SimpleServerSideFilterData (class in zen_dash.objects.instances)</a>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions docs/zen_dash.objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,16 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<span class="sig-name descname"><span class="pre">CHART</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'chart'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.CHART" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="zen_dash.objects.instances.HighChartType.Funnel">
<span class="sig-name descname"><span class="pre">Funnel</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'funnel'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.Funnel" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="zen_dash.objects.instances.HighChartType.Gantt">
<span class="sig-name descname"><span class="pre">Gantt</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'gantt'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.Gantt" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="zen_dash.objects.instances.HighChartType.MAP">
<span class="sig-name descname"><span class="pre">MAP</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'map'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.MAP" title="Permalink to this definition"></a></dt>
Expand All @@ -716,6 +726,11 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<span class="sig-name descname"><span class="pre">STOCK</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'stock'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.STOCK" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="zen_dash.objects.instances.HighChartType.Sankey">
<span class="sig-name descname"><span class="pre">Sankey</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'sankey'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.Sankey" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py class">
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ import { AppDownloadComponent } from './component/app-download/app-download.comp
import { AppUploadComponent } from './component/app-upload/app-upload.component';
import { AppImageComponent } from './component/app-image/app-image.component';
import { HighchartComponent } from './component/highchart/highchart.component';
import { ChartModule } from 'angular-highcharts';
import { ChartModule, HIGHCHARTS_MODULES } from 'angular-highcharts';
import * as more from 'highcharts/highcharts-more.src';
import * as exporting from 'highcharts/modules/exporting.src'
import { SimpleServerFilterComponent } from './component/simple-server-filter/simple-server-filter.component';
import { AppIframeComponent } from './component/app-iframe/app-iframe.component';
import { SafePipe } from './shared/safe.pipe';
Expand Down Expand Up @@ -196,7 +198,10 @@ import { SupportDialogComponent } from './component/support-dialog/support-dialo
JsonFormsModule,
JsonFormsAngularMaterialModule,
],
providers: [CookieService, {provide:HTTP_INTERCEPTORS, useClass: PostInterceptor,multi: true }, CookieServiceDelete],
providers: [CookieService, {provide:HTTP_INTERCEPTORS, useClass: PostInterceptor,multi: true },
CookieServiceDelete,
{provide: HIGHCHARTS_MODULES, useFactory: () => [more, exporting]}
],
bootstrap: [AppComponent],
})
export class AppModule {}
29 changes: 27 additions & 2 deletions frontend/src/app/component/highchart/highchart.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { Chart, StockChart, MapChart } from 'angular-highcharts';
import { Component, Input, OnInit } from '@angular/core';
import { Component, Input, OnInit, ViewContainerRef, AfterViewInit } from '@angular/core';
import { DataService } from 'src/app/services/data.service';
import * as Highcharts from 'highcharts';
import Sankey from "node_modules/highcharts/modules/sankey"
import Funnel from "node_modules/highcharts/modules/funnel"
import Gantt from "node_modules/highcharts/modules/gantt"



@Component({
selector: 'app-highchart',
Expand Down Expand Up @@ -33,7 +39,7 @@ export class HighchartComponent implements OnInit {



ngOnInit(): void {
async ngOnInit() {

this.checkFunction(this.dataService.all_input.get(this.url)?.highchart_data?.config)

Expand All @@ -55,6 +61,25 @@ export class HighchartComponent implements OnInit {
);
}

if (this.dataService.all_input.get(this.url)?.highchart_data?.type == "sankey"){
Sankey(Highcharts)
this.data = new Chart(
this.dataService.all_input.get(this.url)?.highchart_data?.config
);
}

if (this.dataService.all_input.get(this.url)?.highchart_data?.type == "funnel"){
Funnel(Highcharts)
this.data = new Chart(
this.dataService.all_input.get(this.url)?.highchart_data?.config
);
}
if (this.dataService.all_input.get(this.url)?.highchart_data?.type == "gantt"){
Gantt(Highcharts)
this.data = new Chart(
this.dataService.all_input.get(this.url)?.highchart_data?.config
);
}

setTimeout(this.resize_it, 1000);
}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zen_dash"
version = "0.6.20"
version = "0.6.21"
license = "MIT"
description = "Simple yet scable and production ready python dashboard that is better than shiny application for business."
readme = "README.md"
Expand Down
Binary file modified sphinx/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified sphinx/_build/doctrees/zen_dash.objects.doctree
Binary file not shown.
5 changes: 4 additions & 1 deletion sphinx/_build/html/_modules/zen_dash/objects/instances.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ <h1>Source code for zen_dash.objects.instances</h1><div class="highlight"><pre>
<div class="viewcode-block" id="HighChartType"><a class="viewcode-back" href="../../../zen_dash.objects.html#zen_dash.objects.instances.HighChartType">[docs]</a><span class="k">class</span> <span class="nc">HighChartType</span><span class="p">(</span><span class="n">Enum</span><span class="p">):</span>
<span class="n">CHART</span> <span class="o">=</span> <span class="s2">&quot;chart&quot;</span>
<span class="n">STOCK</span> <span class="o">=</span> <span class="s2">&quot;stock&quot;</span>
<span class="n">MAP</span> <span class="o">=</span> <span class="s2">&quot;map&quot;</span></div>
<span class="n">MAP</span> <span class="o">=</span> <span class="s2">&quot;map&quot;</span>
<span class="n">Sankey</span> <span class="o">=</span> <span class="s2">&quot;sankey&quot;</span>
<span class="n">Funnel</span> <span class="o">=</span> <span class="s2">&quot;funnel&quot;</span>
<span class="n">Gantt</span> <span class="o">=</span> <span class="s2">&quot;gantt&quot;</span></div>

<div class="viewcode-block" id="HighChartData"><a class="viewcode-back" href="../../../zen_dash.objects.html#zen_dash.objects.instances.HighChartData">[docs]</a><span class="k">class</span> <span class="nc">HighChartData</span><span class="p">(</span><span class="n">BaseUpdate</span><span class="p">):</span>
<span class="nb">type</span><span class="p">:</span> <span class="n">HighChartType</span> <span class="o">=</span> <span class="n">HighChartType</span><span class="o">.</span><span class="n">CHART</span>
Expand Down
10 changes: 8 additions & 2 deletions sphinx/_build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ <h2 id="F">F</h2>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.ReactiveData.full_rective">full_rective (zen_dash.objects.instances.ReactiveData attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.Zen.full_url">full_url() (zen_dash.objects.Zen static method)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.HighChartType.Funnel">Funnel (zen_dash.objects.instances.HighChartType attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.flex_data.FlexData.fxFlex">fxFlex (zen_dash.objects.flex_data.FlexData attribute)</a>
</li>
Expand All @@ -407,6 +409,8 @@ <h2 id="F">F</h2>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.HighChartType.Gantt">Gantt (zen_dash.objects.instances.HighChartType attribute)</a>
</li>
<li><a href="zen_dash.tag.html#zen_dash.tag.TAG.get_id">get_id (zen_dash.tag.TAG property)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.sidebar.get_page_dict">get_page_dict() (in module zen_dash.objects.sidebar)</a>
Expand Down Expand Up @@ -858,6 +862,8 @@ <h2 id="R">R</h2>
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.HighChartType.Sankey">Sankey (zen_dash.objects.instances.HighChartType attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.CustomHTML.script">script (zen_dash.objects.instances.CustomHTML attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.scripts.CustomScripts.scripts">scripts (zen_dash.objects.scripts.CustomScripts attribute)</a>
Expand Down Expand Up @@ -913,11 +919,11 @@ <h2 id="S">S</h2>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.UpdateReturnData.simple_fitler_data">simple_fitler_data (zen_dash.objects.instances.UpdateReturnData attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.InstanceType.SIMPLE_SERVER_FILTER">SIMPLE_SERVER_FILTER (zen_dash.objects.instances.InstanceType attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.ReturnData.simple_server_filter_data">simple_server_filter_data (zen_dash.objects.instances.ReturnData attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.ReturnData.simple_server_filter_data">simple_server_filter_data (zen_dash.objects.instances.ReturnData attribute)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.SimpleFilterData">SimpleFilterData (class in zen_dash.objects.instances)</a>
</li>
<li><a href="zen_dash.objects.html#zen_dash.objects.instances.SimpleServerSideFilterData">SimpleServerSideFilterData (class in zen_dash.objects.instances)</a>
Expand Down
Binary file modified sphinx/_build/html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion sphinx/_build/html/searchindex.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions sphinx/_build/html/zen_dash.objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,16 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<span class="sig-name descname"><span class="pre">CHART</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'chart'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.CHART" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="zen_dash.objects.instances.HighChartType.Funnel">
<span class="sig-name descname"><span class="pre">Funnel</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'funnel'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.Funnel" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="zen_dash.objects.instances.HighChartType.Gantt">
<span class="sig-name descname"><span class="pre">Gantt</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'gantt'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.Gantt" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="zen_dash.objects.instances.HighChartType.MAP">
<span class="sig-name descname"><span class="pre">MAP</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'map'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.MAP" title="Permalink to this definition"></a></dt>
Expand All @@ -716,6 +726,11 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<span class="sig-name descname"><span class="pre">STOCK</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'stock'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.STOCK" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="zen_dash.objects.instances.HighChartType.Sankey">
<span class="sig-name descname"><span class="pre">Sankey</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'sankey'</span></em><a class="headerlink" href="#zen_dash.objects.instances.HighChartType.Sankey" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py class">
Expand Down
3 changes: 3 additions & 0 deletions zen_dash/objects/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ class HighChartType(Enum):
CHART = "chart"
STOCK = "stock"
MAP = "map"
Sankey = "sankey"
Funnel = "funnel"
Gantt = "gantt"

class HighChartData(BaseUpdate):
type: HighChartType = HighChartType.CHART
Expand Down
2 changes: 1 addition & 1 deletion zen_dash/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<style>.mat-typography{font:400 14px/20px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.mat-typography{font:400 14px/20px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}body{font-family:Roboto,Helvetica Neue,sans-serif;margin:0;position:relative;overflow:auto;display:inline-block;overflow:hidden}html{margin:0;height:100%;width:100%}body{margin:0;min-height:100%;width:100%}</style><link rel="stylesheet" href="styles.362a8260c32d36d9.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.362a8260c32d36d9.css"></noscript></head>
<body class="mat-typography">
<app-root></app-root>
<script src="runtime.6a9b461ae5a72237.js" type="module"></script><script src="polyfills.0a8881ff36766b1e.js" type="module"></script><script src="vendor.35ad083aa8effc78.js" type="module"></script><script src="main.704ef86062877aa9.js" type="module"></script>
<script src="runtime.6a9b461ae5a72237.js" type="module"></script><script src="polyfills.0a8881ff36766b1e.js" type="module"></script><script src="vendor.7eb88cb5aa8cd55d.js" type="module"></script><script src="main.c324fe0b100948ea.js" type="module"></script>

</body></html>
1 change: 0 additions & 1 deletion zen_dash/static/main.704ef86062877aa9.js

This file was deleted.

1 change: 1 addition & 0 deletions zen_dash/static/main.c324fe0b100948ea.js

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions zen_dash/static/vendor.35ad083aa8effc78.js

This file was deleted.

7 changes: 7 additions & 0 deletions zen_dash/static/vendor.7eb88cb5aa8cd55d.js

Large diffs are not rendered by default.

0 comments on commit 81776ea

Please sign in to comment.