{{- $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" }}
{{- end }}
{{ $title }} {{ partial "sprite" (dict "icon" "sort") . }} | {{- end }} {{- range $dataFile }} {{- $entry := . }}
---|
{{ index $entry $index }} | {{- end }}