@juspay/svelte-ui-components 2.107.1 → 2.108.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.
@@ -48,6 +48,7 @@
48
48
  xAxisCategories,
49
49
  xTickFormat,
50
50
  yTickFormat,
51
+ yIntegerTicks = false,
51
52
  aspectRatio = 16 / 9,
52
53
  minHeight = 0,
53
54
  maxHeight = DEFAULT_CHART_MAX_HEIGHT,
@@ -581,6 +582,7 @@
581
582
  orientation="left"
582
583
  scale={yScale}
583
584
  tickCount={yTickCount}
585
+ integerTicks={yIntegerTicks}
584
586
  {showGridlines}
585
587
  gridlineLength={dims.innerWidth}
586
588
  label={yAxisLabel}
@@ -93,6 +93,13 @@ export type OptionalLineChartProperties = {
93
93
  xTickFormat?: (value: number | string) => string;
94
94
  /** Formatter for Y axis tick labels. */
95
95
  yTickFormat?: (value: number | string) => string;
96
+ /**
97
+ * Snap Y-axis ticks to whole numbers (mirrors the X axis' category
98
+ * behaviour). Use for count-style series (orders, items) where a small
99
+ * domain would otherwise produce fractional ticks (0, 0.5, 1, 1.5, 2) —
100
+ * `yTickFormat` only changes label text, not tick placement.
101
+ */
102
+ yIntegerTicks?: boolean;
96
103
  /** Width-to-height ratio for the chart. */
97
104
  aspectRatio?: number;
98
105
  /** Minimum chart height in pixels, regardless of computed aspect-ratio height. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.107.1",
3
+ "version": "2.108.1",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",