1
0
mirror of https://github.com/nikolaydubina/calendarheatmap.git synced 2025-03-04 08:08:00 +02:00
calendarheatmap/charts/template.svg

14 lines
822 B
XML
Raw Normal View History

2021-08-10 18:42:20 +08:00
<svg viewBox="0 0 762 112" xmlns="http://www.w3.org/2000/svg" xmlns:xlink= "http://www.w3.org/1999/xlink">
<g transform="translate(20, 20)">
2020-12-07 19:55:29 +08:00
{{range $w, $wo := $.Days}}<g transform="translate({{mul 14 $w}}, 0)">
2021-02-27 17:21:46 +00:00
{{range $d, $do := $wo}}{{if $do.Show}}<rect class="day" width="11" height="11" x="0" y="{{mul 13 $d}}" fill="{{$do.Color}}" data-count="{{$do.Count}}" data-date="{{$do.Date}}"></rect>{{end}}
2020-12-07 19:55:29 +08:00
{{end}}
</g>
{{end}}
2021-02-27 17:21:46 +00:00
{{range $i, $label := $.LabelsMonths}}<text x="{{mul 14 $label.XOffset}}" y="-7" font-size="8px" fill="{{$.LabelsColor}}">{{$label.Label}}</text>
2020-12-07 19:55:29 +08:00
{{end}}
2021-08-10 18:42:20 +08:00
{{range $i, $o := $.LabelsWeekdays}}<text text-anchor="start" font-size="8px" dx="-20" dy="{{add 8 (mul 13 $i)}}" fill="{{$.LabelsColor}}" {{if not $o.Show}}style="display: none;"{{end}}>{{$o.Label}}</text>
2020-12-07 19:55:29 +08:00
{{end}}
2021-08-10 18:42:20 +08:00
</g></svg>