mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
Fix pies!
This commit is contained in:
parent
6cbc1577ae
commit
849a814898
1 changed files with 5 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { PieChart } from "layerchart";
|
||||
import { secondsToDisplay } from "./utils";
|
||||
|
||||
let {
|
||||
title,
|
||||
|
|
@ -51,6 +52,9 @@
|
|||
const rows = Math.max(1, Math.ceil(data.length / 4));
|
||||
return Math.min(96, 24 + rows * 18);
|
||||
});
|
||||
|
||||
const formatDuration = (value: number | null | undefined) =>
|
||||
secondsToDisplay(value ?? 0);
|
||||
</script>
|
||||
|
||||
<div
|
||||
|
|
@ -68,6 +72,7 @@
|
|||
padding={{ bottom: legendPadding }}
|
||||
props={{
|
||||
legend: { classes: legendClasses },
|
||||
tooltip: { item: { format: formatDuration } },
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue