layerchart 0.51.0 → 0.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ import Axis from '../Axis.svelte';
8
8
  import Chart from '../Chart.svelte';
9
9
  import Highlight from '../Highlight.svelte';
10
10
  import Labels from '../Labels.svelte';
11
+ import Line from '../Line.svelte';
11
12
  import Points from '../Points.svelte';
12
13
  import Svg from '../layout/Svg.svelte';
13
14
  import * as Tooltip from '../tooltip/index.js';
@@ -94,6 +95,12 @@ $: xScale = accessor(x)(chartData[0]) instanceof Date ? scaleTime() : scaleLinea
94
95
 
95
96
  <slot name="marks" {...slotProps}>
96
97
  {#each series as s, i}
98
+ {@const lineProps = {
99
+ ...props.line,
100
+ ...(typeof props.area?.line === 'object' ? props.area.line : null),
101
+ ...(typeof s.props?.line === 'object' ? s.props.line : null),
102
+ }}
103
+
97
104
  <Area
98
105
  data={s.data}
99
106
  y0={stackSeries
@@ -106,11 +113,15 @@ $: xScale = accessor(x)(chartData[0]) instanceof Date ? scaleTime() : scaleLinea
106
113
  : Array.isArray(s.value)
107
114
  ? s.value[1]
108
115
  : (s.value ?? s.key)}
109
- line={{ class: 'stroke-2', stroke: s.color }}
110
116
  fill={s.color}
111
117
  fill-opacity={0.3}
112
118
  {...props.area}
113
119
  {...s.props}
120
+ line={{
121
+ class: !('stroke-width' in lineProps) ? 'stroke-2' : '',
122
+ stroke: s.color,
123
+ ...lineProps,
124
+ }}
114
125
  />
115
126
  {/each}
116
127
  </slot>
@@ -4,6 +4,7 @@ import Area from '../Area.svelte';
4
4
  import Axis from '../Axis.svelte';
5
5
  import Highlight from '../Highlight.svelte';
6
6
  import Labels from '../Labels.svelte';
7
+ import Line from '../Line.svelte';
7
8
  import Points from '../Points.svelte';
8
9
  import { type Accessor } from '../../utils/common.js';
9
10
  declare class __sveltets_Render<TData> {
@@ -234,6 +235,7 @@ declare class __sveltets_Render<TData> {
234
235
  xAxis?: Partial<ComponentProps<Axis>>;
235
236
  yAxis?: Partial<ComponentProps<Axis>>;
236
237
  area?: Partial<ComponentProps<Area>>;
238
+ line?: Partial<ComponentProps<Line>>;
237
239
  points?: Partial<ComponentProps<Points>>;
238
240
  highlight?: Partial<ComponentProps<Highlight>>;
239
241
  labels?: Partial<ComponentProps<Labels>>;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "Sean Lynch <techniq35@gmail.com>",
5
5
  "license": "MIT",
6
6
  "repository": "techniq/layerchart",
7
- "version": "0.51.0",
7
+ "version": "0.51.1",
8
8
  "devDependencies": {
9
9
  "@changesets/cli": "^2.27.7",
10
10
  "@mdi/js": "^7.4.47",