blob: b6b663bbad88a95d468c61cda5f4d0595ac3bf4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<script>
var chart = c3.generate({
bindto: '{{ .Get "chart" }}',
data: {
{{ with .x }}
x: '{{.}}',
{{ end }}
url: '{{ .Get "url" }}',
type: '{{ .Get "type" }}'
}
{{ if (or ( isset .xLabel )(or ( isset .yLabel )( .y2Label ))) }}
,axis: {
{{ with .xLabel }}
x: {
label: '{{.}}'
}
{{ end }}
{{ if isset .yLabel }},{{end}}
{{ with .yLabel }}
x: {
label: '{{.}}'
}
{{ if isset .y2Label }},{{end}}
{{ with .y2Label }}
x: {
label: '{{.}}'
}
}
{{ end }}
});
</script>
|