@moderneinc/react-charts 1.2.0-next.a9ecc0 → 1.2.0-next.aafb3b
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/stacked-area-with-timeline/hooks/use-stacked-area-with-timeline.hook.d.ts +4 -3
- package/dist/components/stacked-area-with-timeline/utils/render-timeline-track.d.ts +3 -11
- package/dist/index.cjs +27 -122
- package/dist/index.d.ts +1 -3
- package/dist/index.js +8508 -24562
- package/dist/{components/stacked-area-chart/stacked-area-chart.constants.d.ts → theme/chart-palettes.d.ts} +4 -60
- package/dist/theme/timeline-defaults.d.ts +0 -8
- package/package.json +6 -16
- package/dist/components/morph-chart/index.d.ts +0 -2
- package/dist/components/morph-chart/utils/accordion-generator.d.ts +0 -102
- package/dist/components/morph-chart/utils/animation-utils.d.ts +0 -44
- package/dist/components/morph-chart/utils/arc-path-calculator.d.ts +0 -53
- package/dist/components/morph-chart/utils/morph-interpolator.d.ts +0 -96
- package/dist/components/morph-chart/utils/segment-transformer.d.ts +0 -70
- package/dist/components/morph-chart/utils/slinky-3d-generator.d.ts +0 -35
- package/dist/components/morph-chart/utils/svg-slinky-generator.d.ts +0 -25
- package/dist/components/stacked-area-chart/hooks/use-stacked-area-chart.hook.d.ts +0 -6
- package/dist/components/stacked-area-chart/stacked-area-chart.component.d.ts +0 -10
- package/dist/components/stacked-area-chart/stacked-area-chart.types.d.ts +0 -186
- package/dist/components/stacked-area-chart/utils/color.utils.d.ts +0 -4
- package/dist/components/stacked-area-with-timeline/index.d.ts +0 -4
package/dist/components/stacked-area-with-timeline/hooks/use-stacked-area-with-timeline.hook.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { D3StackedAreaCategory } from '../../d3-stacked-area-chart/d3-stacked-area-chart.types';
|
|
3
3
|
import { HoveredData, HoveredMarker, HoveredTimelineEvent, StackedAreaDataPoint, TimelineEvent } from '../stacked-area-with-timeline.types';
|
|
4
|
-
|
|
4
|
+
type UseStackedAreaWithTimelineOptions = {
|
|
5
5
|
containerRef: RefObject<SVGSVGElement | null>;
|
|
6
6
|
data: StackedAreaDataPoint[];
|
|
7
7
|
categories: D3StackedAreaCategory[];
|
|
@@ -38,15 +38,16 @@ export type UseStackedAreaWithTimelineOptions = {
|
|
|
38
38
|
hoveredCategory?: string | null;
|
|
39
39
|
onTimelineEventHover?: (event: HoveredTimelineEvent) => void;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
type VisibleMarker = {
|
|
42
42
|
timestamp: number;
|
|
43
43
|
label?: string;
|
|
44
44
|
color?: string;
|
|
45
45
|
x: number;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
type UseStackedAreaWithTimelineResult = {
|
|
48
48
|
hoveredTimelineEvent: HoveredTimelineEvent;
|
|
49
49
|
hoveredMarker: HoveredMarker;
|
|
50
50
|
visibleMarkers: VisibleMarker[];
|
|
51
51
|
};
|
|
52
52
|
export declare const useStackedAreaWithTimeline: ({ containerRef, data, categories, width, height, margin, timelineEvents, showTimeline, timelineHeight, timelineOffset, timeRange, showGrid, showAxes, axisLabelColor, axisLabelSize, enableBrush, onTimeRangeChange, minAllowedTime, maxAllowedTime, brushColor, formatDate, formatValue, markers, onHoveredDataChange, hoveredCategory, onTimelineEventHover }: UseStackedAreaWithTimelineOptions) => UseStackedAreaWithTimelineResult;
|
|
53
|
+
export {};
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { ScaleTime } from 'd3-scale';
|
|
2
2
|
import { Selection } from 'd3-selection';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
eventName: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
};
|
|
8
|
-
export type HoveredTimelineEvent = {
|
|
9
|
-
timestamp: number;
|
|
10
|
-
eventName: string;
|
|
11
|
-
x: number;
|
|
12
|
-
} | null;
|
|
13
|
-
export type RenderTimelineTrackOptions = {
|
|
3
|
+
import { HoveredTimelineEvent, TimelineEvent } from '../stacked-area-with-timeline.types';
|
|
4
|
+
type RenderTimelineTrackOptions = {
|
|
14
5
|
/** D3 SVG selection */
|
|
15
6
|
svg: Selection<SVGSVGElement, unknown, null, undefined>;
|
|
16
7
|
/** Timeline events to display */
|
|
@@ -52,3 +43,4 @@ export type RenderTimelineTrackOptions = {
|
|
|
52
43
|
* - Double-click to reset to full time range
|
|
53
44
|
*/
|
|
54
45
|
export declare function renderTimelineTrack({ svg, events, xScale, chartHeight, chartWidth, timelineHeight, timelineOffset, instanceId, setHoveredTimelineEvent, enableBrush, onTimeRangeChange, minAllowedTime, maxAllowedTime, brushColor, mainGroupSelector }: RenderTimelineTrackOptions): void;
|
|
46
|
+
export {};
|