svelte-tiny-linked-charts 1.5.0 → 1.6.0
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/README.md
CHANGED
|
@@ -111,6 +111,7 @@ Property | Default | Description
|
|
|
111
111
|
--- | --- | ---
|
|
112
112
|
linked | | Key to link this label to charts with the same key.
|
|
113
113
|
empty | \ | String that will be displayed when no bar is being hovered.
|
|
114
|
+
transform | (label) => label | Transform the given label to format it differently from how it was supplied.
|
|
114
115
|
|
|
115
116
|
`<LinkedValue />` component.
|
|
116
117
|
Property | Default | Description
|
|
@@ -118,3 +119,4 @@ Property | Default | Description
|
|
|
118
119
|
uid | | Unique ID to link this value to a chart with the same uid.
|
|
119
120
|
empty | \ | String that will be displayed when no bar is being hovered.
|
|
120
121
|
valueUndefined | 0 | For when the hovering value returns undefined.
|
|
122
|
+
transform | (value) => value | Transform the given value to format it differently from how it was supplied.
|
package/dist/LinkedLabel.svelte
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export default class LinkedLabel extends SvelteComponent<{
|
|
5
5
|
linked: any;
|
|
6
6
|
empty?: string;
|
|
7
|
+
transform?: (label: any) => any;
|
|
7
8
|
}, {
|
|
8
9
|
[evt: string]: CustomEvent<any>;
|
|
9
10
|
}, {}> {
|
|
@@ -16,6 +17,7 @@ declare const __propDef: {
|
|
|
16
17
|
props: {
|
|
17
18
|
linked: any;
|
|
18
19
|
empty?: string;
|
|
20
|
+
transform?: (label: any) => any;
|
|
19
21
|
};
|
|
20
22
|
events: {
|
|
21
23
|
[evt: string]: CustomEvent<any>;
|
package/dist/LinkedValue.svelte
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
export let uid
|
|
5
5
|
export let empty = " "
|
|
6
6
|
export let valueUndefined = 0
|
|
7
|
+
export let transform = (value) => value
|
|
7
8
|
|
|
8
9
|
$: value = $hoveringValue[uid]
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
{#if uid in $hoveringValue && value !== null}
|
|
12
|
-
{value || valueUndefined}
|
|
13
|
+
{transform(value) || valueUndefined}
|
|
13
14
|
{:else}
|
|
14
15
|
{@html empty}
|
|
15
16
|
{/if}
|
|
@@ -5,6 +5,7 @@ export default class LinkedValue extends SvelteComponent<{
|
|
|
5
5
|
uid: any;
|
|
6
6
|
valueUndefined?: number;
|
|
7
7
|
empty?: string;
|
|
8
|
+
transform?: (value: any) => any;
|
|
8
9
|
}, {
|
|
9
10
|
[evt: string]: CustomEvent<any>;
|
|
10
11
|
}, {}> {
|
|
@@ -18,6 +19,7 @@ declare const __propDef: {
|
|
|
18
19
|
uid: any;
|
|
19
20
|
valueUndefined?: number;
|
|
20
21
|
empty?: string;
|
|
22
|
+
transform?: (value: any) => any;
|
|
21
23
|
};
|
|
22
24
|
events: {
|
|
23
25
|
[evt: string]: CustomEvent<any>;
|