mirror of https://github.com/onweru/compose.git

Blake Gearin
14.23.2022 882a2a3d9d3b7039826185dd64ccedbfee998fcb
Add option to remove filter on table charts
2 files modified
12 ■■■■ changed files
exampleSite/content/docs/compose/graphs-charts-tables.md 10 ●●●● patch | view | raw | blame | history
layouts/shortcodes/chart.html 2 ●●●●● patch | view | raw | blame | history
exampleSite/content/docs/compose/graphs-charts-tables.md
@@ -90,8 +90,14 @@
  {{< chart "dataset2" "pie,doughnut" "1" >}}
{{< /grid >}}
#### Show table only
#### Show table with filter
{{< grid "3" >}}
  {{< chart "dataset2" "table" >}}
{{< /grid >}}
{{< /grid >}}
#### Show table only
{{< grid "3" >}}
  {{< chart "dataset2" "table,noFilter" >}}
{{< /grid >}}
layouts/shortcodes/chart.html
@@ -27,9 +27,11 @@
{{- if in $charts "table" }}
<script src = '{{ absURL "js/w3.js" }}'></script>
<div class="table_wrap">
  {{- if not (in $charts "noFilter") }}
  <p>
    <input oninput="w3.filterHTML('#chartTable', '.row', this.value)" class="form_search search_field" placeholder="Filter Table Values">
  </p>
  {{- end }}
  <table id="chartTable">
    <thead>
      {{- range $index, $title := $data.columnTitles }}