treemap: add frame and heading
This commit is contained in:
parent
44301eed60
commit
b1550ab769
10
index.html
10
index.html
|
@ -120,6 +120,8 @@
|
|||
</div>
|
||||
|
||||
{{ block "update" .Update }}<div id="updatemsg" class="card {{ .Type }}" hx-swap-oob="morph">{{ with .Content }}{{ . }}{{ end }}</div>{{ end }}
|
||||
|
||||
<h3>Treemap</h3>
|
||||
{{ block "treemap" .Treemap }}
|
||||
<div id="treemap" hx-swap="none" hx-swap-oob="morph">
|
||||
{{- with .ViewBox }}
|
||||
|
@ -131,6 +133,12 @@
|
|||
</filter>
|
||||
</defs>
|
||||
|
||||
<g id="frame" style="stroke-width:0.2; stroke:whitesmoke; fill:none;">
|
||||
{{- with .ViewBox }}
|
||||
<rect x="{{ .X }}" y="{{ .Y }}" width="{{ .W }}" height="{{ .H }}"/>
|
||||
{{- end }}
|
||||
</g>
|
||||
|
||||
<g id="shadows" style="fill:gray; filter:url(#shadow);" transform="translate(0.1 0.1)">
|
||||
{{- range .Regions }}{{ with .Rect }}
|
||||
<rect x="{{.X}}" y="{{.Y}}" width="{{.W}}" height="{{.H}}" rx="0.2" />
|
||||
|
@ -141,7 +149,7 @@
|
|||
{{- range .Regions }}
|
||||
<g id="svg-region-{{.Prefix}}" hx-get="/api/dealloc/{{.Prefix}}">
|
||||
<title>{{.Prefix}}</title>\n", p
|
||||
<rect {{ with .Rect }}x="{{.X}}" y="{{.Y}}" width="{{.W}}" height="{{.H}}"{{end}} rx="0.2"/>
|
||||
<rect {{ with .Rect }}x="{{.X}}" y="{{.Y}}" width="{{.W}}" height="{{.H}}"{{end}} rx="0.2"/>
|
||||
</g>
|
||||
{{- end }}
|
||||
</g>
|
||||
|
|
Loading…
Reference in New Issue