{{- $datasetKey := .Get 0 }} {{- $charts := .Get 1 }} {{- $data := index $.Page.Params $datasetKey }} {{- $dataURL := $data.fileLink }} {{- $separator := "," }} {{- $dataFile := getCSV $separator $dataURL }} {{- $dataCompactData := dict -}} {{- $activeColumn := sub $data.baseChartOn 1 }} {{- with .Get 2 }} {{- $activeColumn = sub (int .) 1 }} {{- end }} {{- range $dataFile -}} {{- $value := trim (index . $activeColumn) " " -}} {{- with index $dataCompactData $value -}} {{- $dataCompactData = merge $dataCompactData (dict $value (add 1 .)) -}} {{- else -}} {{- $dataCompactData = merge $dataCompactData (dict $value 1) -}} {{- end -}} {{- end -}} {{- $labels := slice }} {{- range $key, $value := $dataCompactData }} {{- $labels = append $key $labels }} {{- end }} {{- if in $charts "table" }}
{{- if not (in $charts "noFilter") }}

{{- end }} {{- range $index, $title := $data.columnTitles }} {{- end }} {{- range $dataFile }} {{- $entry := . }} {{- range $index, $_ := $data.columnTitles }} {{- end }} {{- end }}
{{ $title }} {{ partial "sprite" (dict "icon" "sort") . }}
{{ index $entry $index }}
{{- end }} {{- $labels = split (delimit $labels ",") "," }} {{- $dataTally := split (delimit $dataCompactData ",") "," }} {{- if in $charts "pie" }}
{{- end }} {{- if in $charts "bar" }}
{{- end }} {{ if in $charts "doughnut" }}
{{- end }}