@communitiesuk/svelte-component-library 0.1.19-beta.19 → 0.1.19-beta.20
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.
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
endColor = "#2D6644",
|
|
20
20
|
floor = undefined,
|
|
21
21
|
ceiling = undefined,
|
|
22
|
+
fill = "grey",
|
|
22
23
|
nBins = 10,
|
|
23
24
|
padding = 0,
|
|
24
25
|
height = 50,
|
|
@@ -34,7 +35,9 @@
|
|
|
34
35
|
skew = true,
|
|
35
36
|
showGridlines = true,
|
|
36
37
|
showTickMarks = false,
|
|
37
|
-
|
|
38
|
+
tickStrokeWidth = 0.25,
|
|
39
|
+
barStrokeWidth = 0,
|
|
40
|
+
barStrokeColor = "white",
|
|
38
41
|
} = $props();
|
|
39
42
|
|
|
40
43
|
let xTicks = $state([]);
|
|
@@ -198,7 +201,7 @@
|
|
|
198
201
|
numberOfTicks={4}
|
|
199
202
|
{showGridlines}
|
|
200
203
|
{showTickMarks}
|
|
201
|
-
strokeWidth={
|
|
204
|
+
strokeWidth={tickStrokeWidth}
|
|
202
205
|
></Axis>
|
|
203
206
|
{/if}
|
|
204
207
|
</g>
|
|
@@ -209,8 +212,9 @@
|
|
|
209
212
|
y={height - yScale(bin.length)}
|
|
210
213
|
width={Math.abs(xScale(bin.x1) - xScale(bin.x0))}
|
|
211
214
|
height={yScale(bin.length)}
|
|
212
|
-
fill={colorScale[i]}
|
|
213
|
-
stroke-width={
|
|
215
|
+
fill={fill ?? colorScale[i]}
|
|
216
|
+
stroke-width={barStrokeWidth}
|
|
217
|
+
stroke={barStrokeColor}
|
|
214
218
|
></rect>
|
|
215
219
|
{/key}
|
|
216
220
|
{/each}
|
|
@@ -18,6 +18,7 @@ declare const Histogram: import("svelte").Component<{
|
|
|
18
18
|
endColor?: string;
|
|
19
19
|
floor?: any;
|
|
20
20
|
ceiling?: any;
|
|
21
|
+
fill?: string;
|
|
21
22
|
nBins?: number;
|
|
22
23
|
padding?: number;
|
|
23
24
|
height?: number;
|
|
@@ -31,7 +32,9 @@ declare const Histogram: import("svelte").Component<{
|
|
|
31
32
|
skew?: boolean;
|
|
32
33
|
showGridlines?: boolean;
|
|
33
34
|
showTickMarks?: boolean;
|
|
34
|
-
|
|
35
|
+
tickStrokeWidth?: number;
|
|
36
|
+
barStrokeWidth?: number;
|
|
37
|
+
barStrokeColor?: string;
|
|
35
38
|
}, {}, "containerWidth">;
|
|
36
39
|
type $$ComponentProps = {
|
|
37
40
|
averageValue?: any;
|
|
@@ -48,6 +51,7 @@ type $$ComponentProps = {
|
|
|
48
51
|
endColor?: string;
|
|
49
52
|
floor?: any;
|
|
50
53
|
ceiling?: any;
|
|
54
|
+
fill?: string;
|
|
51
55
|
nBins?: number;
|
|
52
56
|
padding?: number;
|
|
53
57
|
height?: number;
|
|
@@ -61,5 +65,7 @@ type $$ComponentProps = {
|
|
|
61
65
|
skew?: boolean;
|
|
62
66
|
showGridlines?: boolean;
|
|
63
67
|
showTickMarks?: boolean;
|
|
64
|
-
|
|
68
|
+
tickStrokeWidth?: number;
|
|
69
|
+
barStrokeWidth?: number;
|
|
70
|
+
barStrokeColor?: string;
|
|
65
71
|
};
|