From 7dbf7ec4fe776262279d3e7391ea5feb9c821ee5 Mon Sep 17 00:00:00 2001 From: Scott Rhamy Date: Sat, 6 Dec 2025 16:41:35 -0500 Subject: [PATCH] LineChart-padding - used {...defaultChartPadding} + customs - "axis-labels-inside" added y rule to call attention to labels inside, added xpadding and yNice. - "oscilloscope-time" - added gradient - "series-veritical" and "vertical" centered --- .../LineChart/axis-labels-inside.svelte | 15 +++--- .../components/LineChart/basic.svelte | 10 +++- .../components/LineChart/brush.svelte | 3 +- .../components/LineChart/curve.svelte | 11 ++++- .../LineChart/custom-tooltip.svelte | 4 +- .../components/LineChart/custom.svelte | 12 ++++- .../LineChart/default-series-label.svelte | 10 +++- .../examples/components/LineChart/draw.svelte | 10 +++- .../components/LineChart/dynamic-data.svelte | 3 +- .../LineChart/gradient-encoding.svelte | 2 +- .../LineChart/labels-with-points.svelte | 13 ++++- .../LineChart/labels-within-points.svelte | 6 ++- .../components/LineChart/labels.svelte | 11 ++++- .../LineChart/large-radial-series.svelte | 3 +- .../components/LineChart/large-series.svelte | 3 +- .../components/LineChart/legend.svelte | 3 +- .../LineChart/line-annotation.svelte | 5 +- .../LineChart/null-dashed-gaps.svelte | 4 +- .../components/LineChart/null-gaps.svelte | 11 ++++- .../LineChart/oscilloscope-time.svelte | 48 ++++++++++++++----- .../LineChart/override-color.svelte | 3 +- .../LineChart/point-annotations.svelte | 3 +- .../components/LineChart/points.svelte | 12 ++++- .../components/LineChart/radar-rounded.svelte | 4 +- .../components/LineChart/radar-series.svelte | 3 +- .../LineChart/range-annotation.svelte | 5 +- .../components/LineChart/series-brush.svelte | 3 +- .../series-custom-highlight-point.svelte | 3 +- .../series-individual-tooltip.svelte | 10 +++- .../LineChart/series-point-click.svelte | 3 +- .../series-separate-data-diff-length.svelte | 3 +- .../LineChart/series-separate-data.svelte | 3 +- .../LineChart/series-vertical.svelte | 41 ++++++++-------- .../LineChart/series-with-nulls.svelte | 3 +- .../components/LineChart/series.svelte | 3 +- .../components/LineChart/single-axis-x.svelte | 11 ++++- .../components/LineChart/single-axis-y.svelte | 11 ++++- .../components/LineChart/tooltip-click.svelte | 5 +- .../components/LineChart/vertical.svelte | 4 +- 39 files changed, 227 insertions(+), 93 deletions(-) diff --git a/docs/src/examples/components/LineChart/axis-labels-inside.svelte b/docs/src/examples/components/LineChart/axis-labels-inside.svelte index 690bb538d..aeceb5f34 100644 --- a/docs/src/examples/components/LineChart/axis-labels-inside.svelte +++ b/docs/src/examples/components/LineChart/axis-labels-inside.svelte @@ -1,5 +1,5 @@ - + diff --git a/docs/src/examples/components/LineChart/brush.svelte b/docs/src/examples/components/LineChart/brush.svelte index f19c8b562..6694984f9 100644 --- a/docs/src/examples/components/LineChart/brush.svelte +++ b/docs/src/examples/components/LineChart/brush.svelte @@ -1,6 +1,6 @@ - + diff --git a/docs/src/examples/components/LineChart/custom-tooltip.svelte b/docs/src/examples/components/LineChart/custom-tooltip.svelte index cae0ee067..7463004aa 100644 --- a/docs/src/examples/components/LineChart/custom-tooltip.svelte +++ b/docs/src/examples/components/LineChart/custom-tooltip.svelte @@ -1,5 +1,5 @@ - + {#snippet tooltip({ context })} - import { Axis, Highlight, Layer, LineChart, Spline, Tooltip } from 'layerchart'; + import { + LineChart, + Axis, + Highlight, + Layer, + defaultChartPadding, + Spline, + Tooltip + } from 'layerchart'; import { createDateSeries } from '$lib/utils/data.js'; import { format } from '@layerstack/utils'; @@ -7,7 +15,7 @@ export { data }; - + {#snippet children({ context })} diff --git a/docs/src/examples/components/LineChart/default-series-label.svelte b/docs/src/examples/components/LineChart/default-series-label.svelte index 969fe2792..1a977daa6 100644 --- a/docs/src/examples/components/LineChart/default-series-label.svelte +++ b/docs/src/examples/components/LineChart/default-series-label.svelte @@ -1,5 +1,5 @@ - + diff --git a/docs/src/examples/components/LineChart/draw.svelte b/docs/src/examples/components/LineChart/draw.svelte index de5ee4ac4..b635d97d1 100644 --- a/docs/src/examples/components/LineChart/draw.svelte +++ b/docs/src/examples/components/LineChart/draw.svelte @@ -1,5 +1,5 @@ diff --git a/docs/src/examples/components/LineChart/labels-with-points.svelte b/docs/src/examples/components/LineChart/labels-with-points.svelte index 7d233a204..15e788a8b 100644 --- a/docs/src/examples/components/LineChart/labels-with-points.svelte +++ b/docs/src/examples/components/LineChart/labels-with-points.svelte @@ -1,9 +1,18 @@ - + diff --git a/docs/src/examples/components/LineChart/labels-within-points.svelte b/docs/src/examples/components/LineChart/labels-within-points.svelte index 9d4496438..bc79d7bdd 100644 --- a/docs/src/examples/components/LineChart/labels-within-points.svelte +++ b/docs/src/examples/components/LineChart/labels-within-points.svelte @@ -1,5 +1,5 @@ - + diff --git a/docs/src/examples/components/LineChart/large-radial-series.svelte b/docs/src/examples/components/LineChart/large-radial-series.svelte index 90a6678c3..c82493513 100644 --- a/docs/src/examples/components/LineChart/large-radial-series.svelte +++ b/docs/src/examples/components/LineChart/large-radial-series.svelte @@ -1,5 +1,5 @@ - + {#snippet belowMarks({ series })} {#each series as s} - import { LineChart } from 'layerchart'; + import { LineChart, defaultChartPadding } from 'layerchart'; import { createDateSeries } from '$lib/utils/data.js'; const data = createDateSeries({ count: 30, min: 50, max: 100, value: 'integer' }).map((d) => { @@ -11,4 +11,11 @@ export { data }; - + diff --git a/docs/src/examples/components/LineChart/oscilloscope-time.svelte b/docs/src/examples/components/LineChart/oscilloscope-time.svelte index b6fce62a9..bdca0f1aa 100644 --- a/docs/src/examples/components/LineChart/oscilloscope-time.svelte +++ b/docs/src/examples/components/LineChart/oscilloscope-time.svelte @@ -1,6 +1,10 @@ - + diff --git a/docs/src/examples/components/LineChart/radar-rounded.svelte b/docs/src/examples/components/LineChart/radar-rounded.svelte index 9db3334b2..a8c22e67f 100644 --- a/docs/src/examples/components/LineChart/radar-rounded.svelte +++ b/docs/src/examples/components/LineChart/radar-rounded.svelte @@ -1,5 +1,5 @@ - +
+ +
diff --git a/docs/src/examples/components/LineChart/series-with-nulls.svelte b/docs/src/examples/components/LineChart/series-with-nulls.svelte index 165270652..b39a9f879 100644 --- a/docs/src/examples/components/LineChart/series-with-nulls.svelte +++ b/docs/src/examples/components/LineChart/series-with-nulls.svelte @@ -1,5 +1,5 @@ - + diff --git a/docs/src/examples/components/LineChart/single-axis-y.svelte b/docs/src/examples/components/LineChart/single-axis-y.svelte index 5828d4a9b..8aeab5182 100644 --- a/docs/src/examples/components/LineChart/single-axis-y.svelte +++ b/docs/src/examples/components/LineChart/single-axis-y.svelte @@ -1,9 +1,16 @@ - + diff --git a/docs/src/examples/components/LineChart/tooltip-click.svelte b/docs/src/examples/components/LineChart/tooltip-click.svelte index e987fa762..657e9c377 100644 --- a/docs/src/examples/components/LineChart/tooltip-click.svelte +++ b/docs/src/examples/components/LineChart/tooltip-click.svelte @@ -1,5 +1,5 @@ - +
+ +