layerchart 0.94.0 → 0.94.1

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.
@@ -404,17 +404,12 @@
404
404
  {#each visibleSeries as s, i (s.key)}
405
405
  {@const seriesTooltipData =
406
406
  s.data && tooltip.data ? findRelatedData(s.data, tooltip.data, x) : null}
407
+ {@const highlightPointsProps =
408
+ typeof props.highlight?.points === 'object' ? props.highlight.points : null}
407
409
 
408
410
  <Highlight
409
411
  data={seriesTooltipData}
410
412
  y={stackSeries ? (d) => d.stackData[i][1] : (s.value ?? (s.data ? undefined : s.key))}
411
- points={{
412
- fill: s.color,
413
- class: cls(
414
- 'transition-opacity',
415
- highlightSeriesKey && highlightSeriesKey !== s.key && 'opacity-10'
416
- ),
417
- }}
418
413
  lines={i == 0}
419
414
  onpointclick={onpointclick
420
415
  ? (e, detail) => onpointclick(e, { ...detail, series: s })
@@ -422,6 +417,15 @@
422
417
  onpointenter={() => (highlightSeriesKey = s.key)}
423
418
  onpointleave={() => (highlightSeriesKey = null)}
424
419
  {...props.highlight}
420
+ points={{
421
+ ...highlightPointsProps,
422
+ fill: s.color,
423
+ class: cls(
424
+ 'transition-opacity',
425
+ highlightSeriesKey && highlightSeriesKey !== s.key && 'opacity-10',
426
+ highlightPointsProps?.class
427
+ ),
428
+ }}
425
429
  />
426
430
  {/each}
427
431
  </slot>
@@ -334,16 +334,12 @@
334
334
  {#each visibleSeries as s, i (s.key)}
335
335
  {@const seriesTooltipData =
336
336
  s.data && tooltip.data ? findRelatedData(s.data, tooltip.data, x) : null}
337
+ {@const highlightPointsProps =
338
+ typeof props.highlight?.points === 'object' ? props.highlight.points : null}
339
+
337
340
  <Highlight
338
341
  data={seriesTooltipData}
339
342
  y={s.value ?? (s.data ? undefined : s.key)}
340
- points={{
341
- fill: s.color,
342
- class: cls(
343
- 'transition-opacity',
344
- highlightSeriesKey && highlightSeriesKey !== s.key && 'opacity-10'
345
- ),
346
- }}
347
343
  lines={i === 0}
348
344
  onpointclick={onpointclick
349
345
  ? (e, detail) => onpointclick(e, { ...detail, series: s })
@@ -351,6 +347,15 @@
351
347
  onpointenter={() => (highlightSeriesKey = s.key)}
352
348
  onpointleave={() => (highlightSeriesKey = null)}
353
349
  {...props.highlight}
350
+ points={{
351
+ ...highlightPointsProps,
352
+ fill: s.color,
353
+ class: cls(
354
+ 'transition-opacity',
355
+ highlightSeriesKey && highlightSeriesKey !== s.key && 'opacity-10',
356
+ highlightPointsProps?.class
357
+ ),
358
+ }}
354
359
  />
355
360
  {/each}
356
361
  </slot>
@@ -286,10 +286,13 @@
286
286
  <ChartClipPath disabled={!brush} full>
287
287
  <slot name="highlight" {...slotProps}>
288
288
  <Highlight
289
- points={{ fill: activeSeries?.color }}
290
289
  lines
291
290
  axis="both"
292
291
  {...props.highlight}
292
+ points={{
293
+ fill: activeSeries?.color,
294
+ ...(typeof props.highlight?.points === 'object' ? props.highlight.points : null),
295
+ }}
293
296
  />
294
297
  </slot>
295
298
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "Sean Lynch <techniq35@gmail.com>",
5
5
  "license": "MIT",
6
6
  "repository": "techniq/layerchart",
7
- "version": "0.94.0",
7
+ "version": "0.94.1",
8
8
  "devDependencies": {
9
9
  "@changesets/cli": "^2.27.12",
10
10
  "@mdi/js": "^7.4.47",