@communitiesuk/svelte-component-library 0.1.19-beta.34 → 0.1.19-beta.35

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.
@@ -85,7 +85,7 @@
85
85
  onMouseLeaveMarker = (event, marker, dataId) => {
86
86
  activeMarkerId = null;
87
87
  },
88
- activeMarkerId = undefined,
88
+ activeMarkerId = $bindable(undefined),
89
89
  distribution = [],
90
90
  floor = undefined,
91
91
  ceiling = undefined,
@@ -225,7 +225,7 @@
225
225
  .colors(2);
226
226
 
227
227
  const averageNormalised =
228
- (averageValue - xTickFirst) / (xTickLast - xTickFirst);
228
+ (averageValue - chartDomain[0]) / (chartDomain[1] - chartDomain[0]);
229
229
 
230
230
  const binColors = chroma
231
231
  .scale([extremeColors[0], midColor, extremeColors[1]])
@@ -275,7 +275,8 @@
275
275
  Math.min(
276
276
  nSegments - 1,
277
277
  Math.floor(
278
- (nSegments * (value - xTickFirst)) / (xTickLast - xTickFirst),
278
+ (nSegments * (value - chartDomain[0])) /
279
+ (chartDomain[1] - chartDomain[0]),
279
280
  ),
280
281
  ),
281
282
  );
@@ -446,6 +447,7 @@
446
447
  markerRadius},{positionChart.chartHeight / 2})"
447
448
  >
448
449
  {#if rowValue.shape === "line"}
450
+ {console.log("seg", segmentIndex(rowValue.value))}
449
451
  <line
450
452
  x1={0}
451
453
  x2={0}
@@ -512,7 +514,8 @@
512
514
  >
513
515
  <tspan x="1" dy="15">▲</tspan>
514
516
  <tspan x="1" dy="4">|</tspan>
515
- <tspan font-family="GDS Transport" x="1" dy="13">Average</tspan>
517
+
518
+ <tspan font-family="GDS Transport" x="1" dy="15">Average</tspan>
516
519
  </text>
517
520
  </g>
518
521
  {/if}
@@ -58,7 +58,7 @@ declare const PositionChart: import("svelte").Component<{
58
58
  niceTicks?: boolean;
59
59
  ticksDomain?: any[];
60
60
  axisDomain?: any[];
61
- }, {}, "chartWidth" | "axisDomain" | "ticksDomain">;
61
+ }, {}, "chartWidth" | "axisDomain" | "activeMarkerId" | "ticksDomain">;
62
62
  type $$ComponentProps = {
63
63
  value?: any;
64
64
  min?: any;
@@ -34,8 +34,6 @@
34
34
  paddingBottom?: string;
35
35
  contentSnippet?: Snippet;
36
36
  }>();
37
-
38
- let arg = "hello";
39
37
  </script>
40
38
 
41
39
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@communitiesuk/svelte-component-library",
3
- "version": "0.1.19-beta.34",
3
+ "version": "0.1.19-beta.35",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/communitiesuk/mhclg_svelte_component_library.git"