Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/VVelox/hugo-dusky-neon-potato.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZane C. Bowers-Hadley <vvelox@vvelox.net>2018-09-24 10:38:18 +0300
committerZane C. Bowers-Hadley <vvelox@vvelox.net>2018-09-24 10:38:18 +0300
commit686942094d741e90ed85fdc0feaf0cbc4535f0c4 (patch)
treeb2a3e7637a312f45e0d437b045213b261da816ff
parent100d1546d69627d96f5570f68cb6c93f9a5d53ed (diff)
woot! works properly!... well minus colors
-rw-r--r--layouts/shortcodes/chart-generate.html23
1 files changed, 13 insertions, 10 deletions
diff --git a/layouts/shortcodes/chart-generate.html b/layouts/shortcodes/chart-generate.html
index b6b663b..dcd4f54 100644
--- a/layouts/shortcodes/chart-generate.html
+++ b/layouts/shortcodes/chart-generate.html
@@ -1,30 +1,33 @@
<script>
var chart = c3.generate({
- bindto: '{{ .Get "chart" }}',
+ bindto: '#{{ .Get "chart" }}',
data: {
- {{ with .x }}
+ {{ with .Get "x" }}
x: '{{.}}',
{{ end }}
url: '{{ .Get "url" }}',
type: '{{ .Get "type" }}'
}
- {{ if (or ( isset .xLabel )(or ( isset .yLabel )( .y2Label ))) }}
+ {{ if or (isset .Params "xLabel") (or (isset .Params "yLabel") (isset .Params "y2Label") ) }}
,axis: {
- {{ with .xLabel }}
+ {{ with .Get "xLabel" }}
x: {
label: '{{.}}'
}
{{ end }}
- {{ if isset .yLabel }},{{end}}
- {{ with .yLabel }}
- x: {
+ {{ if isset .Params "yLabel" }},{{end}}
+ {{ with .Get "yLabel" }}
+ y: {
label: '{{.}}'
}
- {{ if isset .y2Label }},{{end}}
- {{ with .y2Label }}
- x: {
+ {{ end }}
+ {{ if isset .Params "y2Label" }},{{end}}
+ {{ with .Get "y2Label" }}
+ y2: {
+ show: true,
label: '{{.}}'
}
+ {{ end }}
}
{{ end }}
});