@moderneinc/react-charts 1.2.0-next.c015c0 → 1.2.0-next.c1bbc5
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.
- package/dist/components/chrono-chart/chrono-chart.component.d.ts +3 -0
- package/dist/components/chrono-chart/chrono-chart.types.d.ts +67 -0
- package/dist/components/chrono-chart/components/category-table.component.d.ts +3 -0
- package/dist/components/chrono-chart/components/category-table.types.d.ts +17 -0
- package/dist/components/chrono-chart/utils/data-transformer.d.ts +9 -0
- package/dist/components/d3-stacked-area-chart/d3-stacked-area-chart.component.d.ts +7 -0
- package/dist/components/d3-stacked-area-chart/d3-stacked-area-chart.types.d.ts +89 -0
- package/dist/components/d3-stacked-area-chart/hooks/use-d3-stacked-area.hook.d.ts +34 -0
- package/dist/components/morph-chart/hooks/shared/computations.d.ts +27 -0
- package/dist/components/morph-chart/hooks/shared/types.d.ts +22 -0
- package/dist/components/morph-chart/hooks/use-morph-chart.hook.d.ts +85 -0
- package/dist/components/morph-chart/index.d.ts +2 -0
- package/dist/components/morph-chart/morph-chart.component.d.ts +14 -0
- package/dist/components/morph-chart/morph-chart.types.d.ts +154 -0
- package/dist/components/morph-chart/utils/animation-constants.d.ts +23 -0
- package/dist/components/morph-chart/utils/animation-utils.d.ts +44 -0
- package/dist/components/morph-chart/utils/arc-path-calculator.d.ts +53 -0
- package/dist/components/morph-chart/utils/area-renderer.d.ts +24 -0
- package/dist/components/morph-chart/utils/bar-renderer.d.ts +19 -0
- package/dist/components/morph-chart/utils/gsap-orchestrator.d.ts +252 -0
- package/dist/components/morph-chart/utils/morph-interpolator.d.ts +96 -0
- package/dist/components/morph-chart/utils/parliament-renderer.d.ts +23 -0
- package/dist/components/morph-chart/utils/parliament-seat-extractor.d.ts +33 -0
- package/dist/components/morph-chart/utils/position-mapper.d.ts +48 -0
- package/dist/components/morph-chart/utils/segment-transformer.d.ts +70 -0
- package/dist/components/morph-chart/utils/svg-patterns.d.ts +19 -0
- package/dist/components/parliament-chart/hooks/use-parliament-chart.hook.d.ts +5 -1
- package/dist/components/parliament-chart/parliament-chart.types.d.ts +5 -0
- package/dist/components/parliament-chart/utils/parliament-animation.d.ts +13 -0
- package/dist/components/stacked-area-chart/stacked-area-chart.types.d.ts +23 -0
- package/dist/components/stacked-area-chart/utils/color.utils.d.ts +0 -5
- package/dist/components/timeline-chart/timeline-chart.types.d.ts +21 -0
- package/dist/index.cjs +109 -71
- package/dist/index.d.ts +7 -0
- package/dist/index.js +23535 -16283
- package/dist/theme/default-colors.d.ts +0 -4
- package/package.json +26 -9
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Maps category index to a color from the measure gradient.
|
|
3
|
-
* Mirrors ParliamentChart logic - first category gets worst color (red), last gets best (green).
|
|
4
|
-
*/
|
|
5
|
-
export declare function getMeasureGradientColor(index: number, totalCategories: number): string;
|
|
6
1
|
/**
|
|
7
2
|
* Generates gradient colors for categories, ordered from worst (red) to best (green).
|
|
8
3
|
*/
|
|
@@ -42,6 +42,13 @@ export type TimelineChartProps = {
|
|
|
42
42
|
selectedRange?: TimelineSelection;
|
|
43
43
|
/** Height of the timeline container in pixels (default: 32) */
|
|
44
44
|
height?: number;
|
|
45
|
+
/** Margin around the timeline drawable area (for alignment with other charts) */
|
|
46
|
+
margin?: {
|
|
47
|
+
top: number;
|
|
48
|
+
right: number;
|
|
49
|
+
bottom: number;
|
|
50
|
+
left: number;
|
|
51
|
+
};
|
|
45
52
|
/** Custom date formatter */
|
|
46
53
|
formatDate?: (timestamp: number) => string;
|
|
47
54
|
/** Custom month/year formatter */
|
|
@@ -66,6 +73,20 @@ export type TimelineChartProps = {
|
|
|
66
73
|
onVisibleRangeChange?: (range: TimelineSelection) => void;
|
|
67
74
|
/** Controlled visible range (for zoom to selection mode) */
|
|
68
75
|
visibleRange?: TimelineSelection;
|
|
76
|
+
/**
|
|
77
|
+
* External time domain control [minTimestamp, maxTimestamp]
|
|
78
|
+
* Simplified alias for visibleRange that uses tuple format instead of object format.
|
|
79
|
+
* When provided, overrides automatic domain calculation and controls the visible time range.
|
|
80
|
+
* Useful for synchronizing multiple charts to show the same time range.
|
|
81
|
+
* Note: This is converted internally to visibleRange format { start, end }
|
|
82
|
+
*/
|
|
83
|
+
timeRange?: [number, number] | null;
|
|
84
|
+
/**
|
|
85
|
+
* Callback when the visible time range changes
|
|
86
|
+
* Simplified alias for onVisibleRangeChange that uses tuple format [start, end].
|
|
87
|
+
* Note: This is converted internally to/from TimelineSelection format { start, end }
|
|
88
|
+
*/
|
|
89
|
+
onTimeRangeChange?: (range: [number, number]) => void;
|
|
69
90
|
/** Props for individual component slots */
|
|
70
91
|
slotProps?: TimelineChartSlotProps;
|
|
71
92
|
};
|