File tree Expand file tree Collapse file tree 1 file changed +21
-19
lines changed Expand file tree Collapse file tree 1 file changed +21
-19
lines changed Original file line number Diff line number Diff line change 1
- <script lang =" ts" >
2
- import { getContext , type Snippet } from ' svelte' ;
3
- import GroupMultiple from ' ./helpers/GroupMultiple.svelte' ;
4
- import type {
5
- PlotContext ,
6
- DataRecord ,
7
- BaseMarkProps ,
8
- ConstantAccessor ,
9
- ChannelAccessor
10
- } from ' ../types.js' ;
11
- import { resolveProp , resolveStyles } from ' ../helpers/resolve.js' ;
12
- import Mark from ' ../Mark.svelte' ;
13
- import { sort } from ' $lib/index.js' ;
14
-
15
- type TextMarkProps = BaseMarkProps & {
1
+ <!--
2
+ @component
3
+ Useful for adding SVG text labels to your plot.
4
+ -->
5
+ <script module lang =" ts" >
6
+ export type TextMarkProps = BaseMarkProps & {
16
7
data: DataRecord [];
17
8
x: ChannelAccessor ;
18
9
y: ChannelAccessor ;
19
- fill? : ChannelAccessor ;
20
- stroke? : ChannelAccessor ;
21
10
children? : Snippet ;
22
- dx? : ConstantAccessor <number >;
23
- dy? : ConstantAccessor <number >;
24
11
text: ConstantAccessor <string >;
25
12
title? : ConstantAccessor <string >;
26
13
/**
42
29
| ' bottom-right'
43
30
>;
44
31
};
32
+ </script >
33
+
34
+ <script lang =" ts" >
35
+ import { getContext , type Snippet } from ' svelte' ;
36
+ import GroupMultiple from ' ./helpers/GroupMultiple.svelte' ;
37
+ import type {
38
+ PlotContext ,
39
+ DataRecord ,
40
+ BaseMarkProps ,
41
+ ConstantAccessor ,
42
+ ChannelAccessor
43
+ } from ' ../types.js' ;
44
+ import { resolveProp , resolveStyles } from ' ../helpers/resolve.js' ;
45
+ import Mark from ' ../Mark.svelte' ;
46
+ import { sort } from ' $lib/index.js' ;
45
47
46
48
let { data = [{}], class : className = null , ... options }: TextMarkProps = $props ();
47
49
You can’t perform that action at this time.
0 commit comments