td-plots 1.11.6 → 1.13.0

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.
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import { PlotParams } from "react-plotly.js";
3
+ export interface LineDataTrace {
4
+ x: Date[];
5
+ y: number[];
6
+ name?: string;
7
+ color?: string;
8
+ hovertemplate?: string;
9
+ }
10
+ export interface HistogramDataTrace {
11
+ x: Date[];
12
+ name?: string;
13
+ color?: string;
14
+ hovertemplate?: string;
15
+ }
16
+ export interface LineOnHistogramProps {
17
+ lineData: LineDataTrace;
18
+ histogramData: HistogramDataTrace;
19
+ width?: number;
20
+ height?: number;
21
+ title?: string;
22
+ plotId?: string;
23
+ xAxisTitle?: string;
24
+ yAxisTitle?: string;
25
+ y2AxisTitle?: string;
26
+ containerStyleOverrides?: React.CSSProperties;
27
+ extraLayoutConfig?: Partial<PlotParams["layout"]>;
28
+ revision?: number;
29
+ }
30
+ declare const LineOnHistogram: (props: LineOnHistogramProps) => import("react/jsx-runtime").JSX.Element;
31
+ export default LineOnHistogram;
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ interface BarDataPoint {
3
+ x: number;
4
+ y: number;
5
+ }
6
+ interface BarDataSeries {
7
+ name: string;
8
+ data: BarDataPoint[];
9
+ color?: string;
10
+ }
11
+ export interface StackedBarPlotProps {
12
+ data: BarDataSeries[];
13
+ histogramData: number[];
14
+ selectedHistogramData?: [number, number];
15
+ selectedHistogramDataColor?: string;
16
+ barWidth?: number;
17
+ barColor?: string;
18
+ barColor2?: string;
19
+ xAccessor?: (d: any) => number;
20
+ yAccessor?: (d: any) => number;
21
+ width?: number;
22
+ height?: number;
23
+ title?: string;
24
+ title2?: string;
25
+ xAxisTitle?: string;
26
+ xAxis2Title?: string;
27
+ yAxisTitle?: string;
28
+ yAxis2Title?: string;
29
+ containerStyleOverrides?: React.CSSProperties;
30
+ plotId?: string;
31
+ xAnnotations?: {
32
+ x: number;
33
+ text?: string;
34
+ color?: string;
35
+ }[];
36
+ barHoverTemplate?: string;
37
+ barGroupTooltipTitle?: string;
38
+ d3FormatValueString?: string;
39
+ }
40
+ declare const StackedBarPlot: (props: StackedBarPlotProps) => import("react/jsx-runtime").JSX.Element;
41
+ export default StackedBarPlot;
@@ -1,4 +1,5 @@
1
1
  export declare const ONEAVGMONTH = 2629800000;
2
+ export declare const ONEWEEK = 604800000;
2
3
  export declare const ONEDAY = 86400000;
3
4
  export declare const ONEHOUR = 3600000;
4
5
  export declare const ONEMINUTE = 60000;
package/dist/index.d.ts CHANGED
@@ -16,9 +16,13 @@ export type { SummaryComparisonPlotProps } from "./components/SummaryComparisonP
16
16
  export { SummaryComparisonPlotLegend } from "./components/SummaryComparisonPlot";
17
17
  export { default as LineWithHistogram } from "./components/LineWithHistogram";
18
18
  export type { LineWithHistogramProps } from "./components/LineWithHistogram";
19
+ export { default as LineOnHistogram } from "./components/LineOnHistogram";
20
+ export type { LineOnHistogramProps } from "./components/LineOnHistogram";
19
21
  export { default as BarPlot } from "./components/BarPlot";
20
22
  export type { BarPlotProps } from "./components/BarPlot";
21
23
  export { LegendColorItem, LegendLineItem } from "./components/LegendUtils";
22
24
  export type { LegendItemProps, LegendLineItemProps, } from "./components/LegendUtils";
25
+ export { default as StackedBarPlot } from "./components/StackedBarPlot";
26
+ export type { StackedBarPlotProps } from "./components/StackedBarPlot";
23
27
  export { isDateArray, isNumberArray } from "./components/Utils";
24
28
  export type { PlotParams } from "react-plotly.js";