15 lines
401 B
Plaintext
Raw Normal View History

2017-07-07 03:22:29 +02:00
component Statistics(pieCharts ...*utils.PieChart)
2017-07-07 02:07:34 +02:00
h1 Statistics
2017-07-07 03:22:29 +02:00
.widgets.statistics
each pie in pieCharts
.widget
h3.widget-title= pie.Title
PieChart(pie.Slices)
2017-07-07 02:07:34 +02:00
2017-07-07 02:37:43 +02:00
component PieChart(slices []*utils.PieChartSlice)
2017-07-07 03:22:29 +02:00
svg.pie-chart(viewBox="-1.1 -1.1 2.2 2.2")
2017-07-07 02:37:43 +02:00
each slice in slices
g
title= slice.Title
path.slice(d=utils.SVGSlicePath(slice.From, slice.To), fill=slice.Color)