caption: 
color: #66ccff
created: 20240312095939655
description: Compare what you did this week
enabled: yes
tags: GaugeExample
icon: 🤠
modified: 20240312095939657
tags: $:/Tags/VisualizationDashboard/Gauge
targetTiddler: Sleeping SubTagExample2
title: PolarTagsHoursWeekExampleGauge
type: text/vnd.tiddlywiki
grid-column-span: 2
grid-row-span: 2

\import [[$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/Template/PolarTagsHoursWeek]]

<div style="height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;">
  <$wikify name="seriesText" text=<<series>>>
    <$echarts
      $height="100%"
      $text=```
        option = {
          series: {
            type: 'bar',
            data: $(seriesText)$.sort((a, b) => a.value - b.value),
            coordinateSystem: 'polar',
            label: {
              show: true,
              position: 'middle',
              formatter: '{b}: {c}'
            }
          },
          title: {
            text: '${[{!!description}]}$'
          },
          polar: {
            radius: [30, '80%']
          },
          radiusAxis: {
            type: 'category',
          },
          angleAxis: {
            max: Math.max(...$(seriesText)$.map(item => item.value)) + 1,
            startAngle: 75,
          },
          tooltip: {},
        };
    ```/>
  </$wikify>
</div>
