@moderneinc/react-charts 1.3.0-next.bc5134 → 1.3.0-next.d7d66e

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.
@@ -126,4 +126,20 @@ export type ChronoChartProps = {
126
126
  * @default '#69b3a2'
127
127
  */
128
128
  brushColor?: string;
129
+ /**
130
+ * Show crosshair cursor on hover (historical mode only).
131
+ * Crosshairs are hidden during morphing transitions.
132
+ * @default true
133
+ */
134
+ showCrosshair?: boolean;
135
+ /**
136
+ * Color for crosshair lines.
137
+ * @default '#666'
138
+ */
139
+ crosshairColor?: string;
140
+ /**
141
+ * Dash array pattern for crosshair lines.
142
+ * @default '4,4'
143
+ */
144
+ crosshairDashArray?: string;
129
145
  };
@@ -39,5 +39,5 @@ type UseD3StackedAreaProps = {
39
39
  y: number;
40
40
  } | null) => void;
41
41
  };
42
- export declare const useD3StackedArea: ({ containerRef, data, categories, width, height, margin, timeRange, showGrid, showXAxis, showYAxis, enableBrush, zoomToSelection, onTimeRangeChange, formatDate, formatValue, markers, markerVisibilityMode, onMarkerHoverChange, brushColor, showCrosshair, crosshairColor, crosshairDashArray, onHoveredAreaChange, onCrosshairMove }: UseD3StackedAreaProps) => void;
42
+ export declare const useD3StackedArea: ({ containerRef, data, categories, width, height, margin, timeRange, showGrid, showXAxis, showYAxis, enableBrush, zoomToSelection, onTimeRangeChange, formatDate, formatValue, markers, markerVisibilityMode, onMarkerHoverChange, brushColor, showCrosshair, onHoveredAreaChange, onCrosshairMove }: UseD3StackedAreaProps) => void;
43
43
  export {};
@@ -74,6 +74,12 @@ export type D3StackedBarChartProps = {
74
74
  * @default '4,4'
75
75
  */
76
76
  crosshairDashArray?: string;
77
+ /**
78
+ * Minimum bar width in pixels. Overrides the automatic minimum width behavior.
79
+ * When not specified, the chart auto-applies a 2px minimum for time ranges > 3 months.
80
+ * Set to 0 to disable minimum width entirely.
81
+ */
82
+ minBarWidth?: number;
77
83
  };
78
84
  export type TooltipData = {
79
85
  visible: boolean;
@@ -26,6 +26,11 @@ type UseD3StackedBarProps = {
26
26
  crosshairDashArray?: string;
27
27
  brushColor?: string;
28
28
  onTooltipChange?: (tooltip: TooltipData | null) => void;
29
+ minBarWidth?: number;
30
+ onCrosshairPositionChange?: (position: {
31
+ x: number;
32
+ y: number;
33
+ } | null) => void;
29
34
  };
30
- export declare const useD3StackedBar: ({ containerRef, data, categories, width, height, margin, timeRange, showGrid, showXAxis, showYAxis, enableBrush, zoomToSelection, onTimeRangeChange, formatDate, formatValue, showCrosshair, crosshairColor, crosshairDashArray, brushColor, onTooltipChange }: UseD3StackedBarProps) => void;
35
+ export declare const useD3StackedBar: ({ containerRef, data, categories, width, height, margin, timeRange, showGrid, showXAxis, showYAxis, enableBrush, zoomToSelection, onTimeRangeChange, formatDate, formatValue, showCrosshair, brushColor, onTooltipChange, minBarWidth, onCrosshairPositionChange }: UseD3StackedBarProps) => void;
31
36
  export {};
@@ -52,8 +52,13 @@ type UseMorphChartProps = {
52
52
  timelineHeight?: number;
53
53
  timelineOffset?: number;
54
54
  brushColor?: string;
55
+ showCrosshair?: boolean;
56
+ onCrosshairMove?: (position: {
57
+ x: number;
58
+ y: number;
59
+ } | null) => void;
55
60
  };
56
- export declare const useMorphChart: ({ containerRef, data, categories, mode, width, height, margin, timeRange, showGrid, showAxes, axisLabelColor, axisLabelSize, formatDate, formatValue, markers, arcAngle, parliamentRadius, seatSize, animationDuration, onMorphComplete, onAnimationStateChange, onTimelineReady, onAnimationProgress, onHoveredDataChange, hoveredCategory: externalHoveredCategory, maxSeats, parliamentTimestamp, enableBrush, onTimeRangeChange, minAllowedTime: minAllowedTimeConstraint, maxAllowedTime: maxAllowedTimeConstraint, showScaleIndicator, reposPerSeat, timelineEvents, showTimeline, timelineHeight, timelineOffset, brushColor }: UseMorphChartProps) => {
61
+ export declare const useMorphChart: ({ containerRef, data, categories, mode, width, height, margin, timeRange, showGrid, showAxes, axisLabelColor, axisLabelSize, formatDate, formatValue, markers, arcAngle, parliamentRadius, seatSize, animationDuration, onMorphComplete, onAnimationStateChange, onTimelineReady, onAnimationProgress, onHoveredDataChange, hoveredCategory: externalHoveredCategory, maxSeats, parliamentTimestamp, enableBrush, onTimeRangeChange, minAllowedTime: minAllowedTimeConstraint, maxAllowedTime: maxAllowedTimeConstraint, showScaleIndicator, reposPerSeat, timelineEvents, showTimeline, timelineHeight, timelineOffset, brushColor, showCrosshair, onCrosshairMove }: UseMorphChartProps) => {
57
62
  isMorphing: boolean;
58
63
  currentMode: MorphMode;
59
64
  hoveredCategory: string | null;
@@ -127,6 +127,22 @@ export type MorphChartProps = {
127
127
  * @default '#69b3a2'
128
128
  */
129
129
  brushColor?: string;
130
+ /**
131
+ * Show crosshair cursor on hover (area mode only).
132
+ * Crosshairs are hidden during morphing transitions.
133
+ * @default false
134
+ */
135
+ showCrosshair?: boolean;
136
+ /**
137
+ * Color for crosshair lines.
138
+ * @default '#666'
139
+ */
140
+ crosshairColor?: string;
141
+ /**
142
+ * Dash array pattern for crosshair lines.
143
+ * @default '4,4'
144
+ */
145
+ crosshairDashArray?: string;
130
146
  };
131
147
  /**
132
148
  * Seat position in parliament layout