svelteplot 0.5.1-pr-238.5 → 0.5.1-pr-238.6
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.
package/dist/marks/Area.svelte
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
sort?: ConstantAccessor<RawValue> | { channel: 'stroke' | 'fill' };
|
|
15
15
|
stack?: Partial<StackOptions>;
|
|
16
16
|
canvas?: boolean;
|
|
17
|
+
areaClass?: ConstantAccessor<string, Datum>;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
import Mark from '../Mark.svelte';
|
|
@@ -37,7 +38,6 @@
|
|
|
37
38
|
ChannelAccessor,
|
|
38
39
|
ScaledDataRecord,
|
|
39
40
|
LinkableMarkProps,
|
|
40
|
-
PlotDefaults,
|
|
41
41
|
RawValue
|
|
42
42
|
} from '../types/index.js';
|
|
43
43
|
import type { StackOptions } from '../transforms/stack.js';
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
curve = 'linear' as CurveName,
|
|
60
60
|
tension = 0,
|
|
61
61
|
class: className = '',
|
|
62
|
+
areaClass,
|
|
62
63
|
canvas = false,
|
|
63
64
|
...options
|
|
64
65
|
}: AreaMarkProps = $derived({ ...DEFAULTS, ...markProps });
|
|
@@ -121,7 +122,7 @@
|
|
|
121
122
|
{#if canvas}
|
|
122
123
|
<AreaCanvas groupedAreaData={grouped} {mark} {usedScales} {areaPath} />
|
|
123
124
|
{:else}
|
|
124
|
-
<GroupMultiple length={grouped.length}>
|
|
125
|
+
<GroupMultiple class={className} length={grouped.length}>
|
|
125
126
|
{#each grouped as areaData, i (i)}
|
|
126
127
|
{@const datum = areaData[0]}
|
|
127
128
|
{#if areaData.length > 0}
|
|
@@ -135,7 +136,11 @@
|
|
|
135
136
|
usedScales
|
|
136
137
|
)}
|
|
137
138
|
<path
|
|
138
|
-
class={[
|
|
139
|
+
class={[
|
|
140
|
+
'area',
|
|
141
|
+
resolveProp(areaClass, areaData[0].datum),
|
|
142
|
+
styleClass
|
|
143
|
+
]}
|
|
139
144
|
clip-path={options.clipPath}
|
|
140
145
|
d={areaPath(areaData)}
|
|
141
146
|
{@attach addEventHandlers({
|
|
@@ -77,6 +77,7 @@ declare class __sveltets_Render<Datum extends DataRow> {
|
|
|
77
77
|
};
|
|
78
78
|
stack?: Partial<renameChannels>;
|
|
79
79
|
canvas?: boolean;
|
|
80
|
+
areaClass?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
80
81
|
}, "y1" | "y2"> & {
|
|
81
82
|
x?: ChannelAccessor<Datum>;
|
|
82
83
|
y?: ChannelAccessor<Datum>;
|