Disable chart tooltips on admin panel

This commit is contained in:
2023-09-14 13:16:07 +02:00
parent e9e52a98d2
commit cc90ccec48
2 changed files with 7 additions and 3 deletions

View File

@@ -182,8 +182,8 @@ onDestroy(() => {
<button on:click={() => loadGraph(1051200, 1440, false)}>Two Years 1d</button> <button on:click={() => loadGraph(1051200, 1440, false)}>Two Years 1d</button>
<button on:click={() => loadGraph(2628000, 1440, false)}>Five Years 1d</button> <button on:click={() => loadGraph(2628000, 1440, false)}>Five Years 1d</button>
</div> </div>
<Chart bind:this={graphBandwidth} data_type="bytes" /> <Chart bind:this={graphBandwidth} data_type="bytes" tooltips={false} />
<Chart bind:this={graphViews} data_type="number" /> <Chart bind:this={graphViews} data_type="number" tooltips={false} />
<div class="highlight_border"> <div class="highlight_border">
Total usage from {start_time} to {end_time}<br/> Total usage from {start_time} to {end_time}<br/>
{formatDataVolume(total_bandwidth, 3)} bandwidth, {formatDataVolume(total_bandwidth, 3)} bandwidth,

View File

@@ -28,6 +28,7 @@ let chart_element
let chart_object let chart_object
export let data_type = "" export let data_type = ""
export let legend = true export let legend = true
export let tooltips = true
export const chart = () => { export const chart = () => {
return chart_object return chart_object
@@ -67,6 +68,9 @@ onMount(() => {
boxHeight: 12, boxHeight: 12,
} }
}, },
tooltip: {
enabled: tooltips,
},
}, },
layout: { layout: {
padding: { padding: {
@@ -107,7 +111,7 @@ onMount(() => {
drawBorder: false, drawBorder: false,
} }
} }
} },
} }
} }
); );