Trying to fix barchart

This commit is contained in:
Gunnar Skjold
2023-11-25 08:41:42 +01:00
parent a2977180c1
commit 5dc405f1da
3 changed files with 13 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@@ -37,7 +37,6 @@
points.push(point(i3));
}
config = {
title: 'Amperage',
padding: { top: 20, right: 15, bottom: 20, left: 35 },
y: {
min: 0,

View File

@@ -36,9 +36,9 @@
<div class="chart" bind:clientWidth={width} bind:clientHeight={height}>
{#if config.x.ticks && config.points && heightAvailable}
{#if config.title}
<strong class="text-sm">{config.title}</strong>
<strong class="text-sm">{config.title}</strong>
{/if}
<svg height="100%">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {width} {heightAvailable}">
<!-- y axis -->
<g class="axis y-axis">
{#each config.y.ticks as tick}