td-plots 1.11.6 → 1.12.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.
- package/dist/components/LineOnHistogram.d.ts +31 -0
- package/dist/components/Utils.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +149 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +149 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ 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";
|
package/dist/index.esm.js
CHANGED
|
@@ -355,6 +355,7 @@ function defaultLocale$2(definition) {
|
|
|
355
355
|
|
|
356
356
|
// Utility functions for our components
|
|
357
357
|
const ONEAVGMONTH = 2629800000; // Average month length in ms, copied from plotly constants in plotly.js/src/constants/numerical.js
|
|
358
|
+
const ONEWEEK = 604800000; // One week in milliseconds
|
|
358
359
|
const ONEDAY = 86400000; // One day in milliseconds
|
|
359
360
|
const ONEHOUR = 3600000; // One hour in milliseconds
|
|
360
361
|
const ONEMINUTE = 60000; // One minute in milliseconds
|
|
@@ -402,12 +403,12 @@ function calculateStandardDeviation(arr) {
|
|
|
402
403
|
// Helpful for making nice bins
|
|
403
404
|
const roundToNextDay = (timestamp) => {
|
|
404
405
|
const date = new Date(timestamp);
|
|
405
|
-
date.
|
|
406
|
+
date.setUTCHours(23, 59, 59, 999); // End of day
|
|
406
407
|
return date.toISOString();
|
|
407
408
|
};
|
|
408
409
|
const roundToPrevDay = (timestamp) => {
|
|
409
410
|
const date = new Date(timestamp);
|
|
410
|
-
date.
|
|
411
|
+
date.setUTCHours(0, 0, 0, 0); // Start of day
|
|
411
412
|
return date.toISOString();
|
|
412
413
|
};
|
|
413
414
|
// Convert plotly M# string to number of milliseconds
|
|
@@ -540,7 +541,7 @@ var SettingsIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
|
|
|
540
541
|
d: "M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"
|
|
541
542
|
}), 'Settings');
|
|
542
543
|
|
|
543
|
-
const Plot$
|
|
544
|
+
const Plot$7 = lazy(() => Promise.resolve().then(function () { return reactPlotlyWrapper$1; }));
|
|
544
545
|
const HistogramPlot = (props) => {
|
|
545
546
|
var _a, _b, _c, _d;
|
|
546
547
|
const { data, title, xAxisTitle, barColor = "rgb(72, 72, 74)", unselectedBarColor = "rgba(203, 195, 195, 0.88)", selectorsColor = "black", containerStyleOverrides, unselectedData = [], handleClickOrSelection = () => { }, onDeselect = () => { }, plotId, selectByBin = false, dateTickFormat, binSizeOverride, statsAnnotations = ["mean"], emptySelectedRange = false, d3FormatValueString = ".1f", showBinSizeControls = "always", onBinSizeCalculated, onBinSizeChange, showBinSizeControlValue = true, isMobile = false, settingsTitleStylingOverrides = {}, } = props;
|
|
@@ -1292,7 +1293,7 @@ const HistogramPlot = (props) => {
|
|
|
1292
1293
|
const newBinSize = newValue;
|
|
1293
1294
|
setBinSize(newBinSize);
|
|
1294
1295
|
onBinSizeChange === null || onBinSizeChange === void 0 ? void 0 : onBinSizeChange(newBinSize);
|
|
1295
|
-
}, colorOverride: barColor, valueLabelFormat: valueLabelFormat, titleStylingOverrides: settingsTitleStylingOverrides, disabledTooltipText: "Requires 10 or more data points" }) }) })] })), jsx(Plot$
|
|
1296
|
+
}, colorOverride: barColor, valueLabelFormat: valueLabelFormat, titleStylingOverrides: settingsTitleStylingOverrides, disabledTooltipText: "Requires 10 or more data points" }) }) })] })), jsx(Plot$7, { data: plotlyData, layout: layout, config: config, onSelected: handleSelection, onClick: handleClick, onDeselect: () => {
|
|
1296
1297
|
onDeselect();
|
|
1297
1298
|
setSelectedRange(null); // Remove selected box
|
|
1298
1299
|
}, onUpdate: handlePlotUpdate, useResizeHandler: true, style: {
|
|
@@ -1303,7 +1304,7 @@ const HistogramPlot = (props) => {
|
|
|
1303
1304
|
} }, `histogram-${plotId || "default"}`)] }) }) }));
|
|
1304
1305
|
};
|
|
1305
1306
|
|
|
1306
|
-
const Plot$
|
|
1307
|
+
const Plot$6 = lazy(() => Promise.resolve().then(function () { return reactPlotlyWrapper$1; }));
|
|
1307
1308
|
const RadialHistogramPlot = (props) => {
|
|
1308
1309
|
const { data, barColor = "rgb(72, 72, 74)", unselectedBarColor = "rgba(203, 195, 195, 0.88)", selectorsColor = "black", onSelected, onClick, containerStyleOverrides, barWidth = 20, // Default bar width in degrees
|
|
1309
1310
|
} = props;
|
|
@@ -1403,14 +1404,14 @@ const RadialHistogramPlot = (props) => {
|
|
|
1403
1404
|
staticPlot: false,
|
|
1404
1405
|
};
|
|
1405
1406
|
const containerStyles = Object.assign({ width: "100%", height: "100%", position: "relative" }, containerStyleOverrides);
|
|
1406
|
-
return (jsx("div", { ref: containerRef, className: "plot-container radial-histogram-container", style: Object.assign({ "--selection-color": selectorsColor }, containerStyles), children: jsx(Suspense, { fallback: jsx(Loading, {}), children: jsx(Plot$
|
|
1407
|
+
return (jsx("div", { ref: containerRef, className: "plot-container radial-histogram-container", style: Object.assign({ "--selection-color": selectorsColor }, containerStyles), children: jsx(Suspense, { fallback: jsx(Loading, {}), children: jsx(Plot$6, { data: plotlyData, layout: layout, config: config, onSelected: onSelected, onClick: onClick, useResizeHandler: true, style: {
|
|
1407
1408
|
width: "100%",
|
|
1408
1409
|
height: "100%",
|
|
1409
1410
|
display: "block",
|
|
1410
1411
|
} }) }) }));
|
|
1411
1412
|
};
|
|
1412
1413
|
|
|
1413
|
-
const Plot$
|
|
1414
|
+
const Plot$5 = lazy(() => Promise.resolve().then(function () { return reactPlotlyWrapper$1; }));
|
|
1414
1415
|
const StatsDonut = (props) => {
|
|
1415
1416
|
const { withCenterLabel = false, centerLabel, centerValue, showLegend = true, legendPosition = "right", containerStyle = {}, } = props;
|
|
1416
1417
|
// Configure legend position based on prop
|
|
@@ -1458,7 +1459,7 @@ const StatsDonut = (props) => {
|
|
|
1458
1459
|
},
|
|
1459
1460
|
]
|
|
1460
1461
|
: [];
|
|
1461
|
-
return (jsx("div", { style: Object.assign({ width: "100%", height: "100%", minHeight: "300px", display: "flex", justifyContent: "center", alignItems: "center" }, containerStyle), children: jsx(Suspense, { fallback: jsx(Loading, {}), children: jsx(Plot$
|
|
1462
|
+
return (jsx("div", { style: Object.assign({ width: "100%", height: "100%", minHeight: "300px", display: "flex", justifyContent: "center", alignItems: "center" }, containerStyle), children: jsx(Suspense, { fallback: jsx(Loading, {}), children: jsx(Plot$5, { data: [
|
|
1462
1463
|
{
|
|
1463
1464
|
type: "pie",
|
|
1464
1465
|
values: props.values,
|
|
@@ -1491,7 +1492,7 @@ const StatsDonut = (props) => {
|
|
|
1491
1492
|
}, useResizeHandler: true }) }) }));
|
|
1492
1493
|
};
|
|
1493
1494
|
|
|
1494
|
-
const Plot$
|
|
1495
|
+
const Plot$4 = lazy(() => Promise.resolve().then(function () { return reactPlotlyWrapper$1; }));
|
|
1495
1496
|
const BoxPlot = (props) => {
|
|
1496
1497
|
const { data, width = 600, height = 400, title = "Box Plot", xAxisTitle, yAxisTitle, containerStyleOverrides, plotId = "boxplot", extraLayoutConfig = {}, } = props;
|
|
1497
1498
|
// Ref for plot container
|
|
@@ -1544,7 +1545,7 @@ const BoxPlot = (props) => {
|
|
|
1544
1545
|
position: "relative",
|
|
1545
1546
|
width: "100%",
|
|
1546
1547
|
height: "100%",
|
|
1547
|
-
}, children: [jsx(Plot$
|
|
1548
|
+
}, children: [jsx(Plot$4, { data: plotlyData, layout: layout, config: config, useResizeHandler: true,
|
|
1548
1549
|
// onHover={handleHover}
|
|
1549
1550
|
// onUnhover={handleUnhover}
|
|
1550
1551
|
style: {
|
|
@@ -2074,7 +2075,7 @@ const SplitBoxPlot = (props) => {
|
|
|
2074
2075
|
return (jsx("div", { style: Object.assign({}, containerStyles), children: jsx(BoxPlot, { data: boxPlotData, width: width, height: height, title: title, xAxisTitle: xAxisTitle, yAxisTitle: yAxisTitle, extraLayoutConfig: extraLayoutConfig, containerStyleOverrides: containerStyleOverrides, plotId: `${plotId}-boxplot` }) }));
|
|
2075
2076
|
};
|
|
2076
2077
|
|
|
2077
|
-
const Plot$
|
|
2078
|
+
const Plot$3 = lazy(() => Promise.resolve().then(function () { return reactPlotlyWrapper$1; }));
|
|
2078
2079
|
const SummaryComparisonPlot = (props) => {
|
|
2079
2080
|
const { groups, height = 250, title = "", xAxisTitle, yAxisTitle, containerStyleOverrides, plotId = "summary-comparison-plot", tooltipPosition = "right", startXAxisAtZero = true, unit = "", xAnnotations = [], tooltipLabels = {}, d3FormatValueString = ".1f", } = props;
|
|
2080
2081
|
// Ref for plot container
|
|
@@ -2349,7 +2350,7 @@ const SummaryComparisonPlot = (props) => {
|
|
|
2349
2350
|
position: "relative",
|
|
2350
2351
|
width: "100%",
|
|
2351
2352
|
height: "100%",
|
|
2352
|
-
}, children: [jsx(Plot$
|
|
2353
|
+
}, children: [jsx(Plot$3, { data: plotlyData, layout: layout, config: config, useResizeHandler: true, onHover: handleHover, onUnhover: handleUnhover, style: {
|
|
2353
2354
|
width: "100%",
|
|
2354
2355
|
height: `${height}px`,
|
|
2355
2356
|
display: "block",
|
|
@@ -2404,7 +2405,7 @@ const SummaryComparisonPlotLegend = ({ comparedDataLabel, summarizedDataLabel, c
|
|
|
2404
2405
|
} })] }), jsx("span", { children: comparedDataLabel })] }), jsxs("div", { style: { display: "flex", gap: "5px", alignItems: "center" }, children: [jsx(Box, { sx: { width: 30, height: 5, backgroundColor: color } }), jsx("span", { children: summarizedDataLabel })] })] }));
|
|
2405
2406
|
};
|
|
2406
2407
|
|
|
2407
|
-
const Plot$
|
|
2408
|
+
const Plot$2 = lazy(() => Promise.resolve().then(function () { return reactPlotlyWrapper$1; }));
|
|
2408
2409
|
// This component plots a line chart in the foreground with a histogram in the backgroun. The histogram
|
|
2409
2410
|
// is used only for context, while the line is intended to have the focus. To that end, the line plot has hover interactions
|
|
2410
2411
|
// while the histogram does not.
|
|
@@ -2528,7 +2529,7 @@ const LineWithHistogram = (props) => {
|
|
|
2528
2529
|
y1: bin.y, // Height matches bin count on y2 axis
|
|
2529
2530
|
fillcolor: histogramData.color || "rgb(211, 211, 212)",
|
|
2530
2531
|
line: {
|
|
2531
|
-
color:
|
|
2532
|
+
color: "white", // Match fill color
|
|
2532
2533
|
width: 0, // No border
|
|
2533
2534
|
},
|
|
2534
2535
|
layer: "below", // Ensure shapes are drawn below traces
|
|
@@ -2552,7 +2553,7 @@ const LineWithHistogram = (props) => {
|
|
|
2552
2553
|
zeroline: false,
|
|
2553
2554
|
showline: true,
|
|
2554
2555
|
mirror: "ticks",
|
|
2555
|
-
gridcolor: "
|
|
2556
|
+
gridcolor: "rgba(239, 239, 239, 0.5)",
|
|
2556
2557
|
gridwidth: 0.2,
|
|
2557
2558
|
zerolinecolor: "#969696",
|
|
2558
2559
|
zerolinewidth: 1,
|
|
@@ -2620,12 +2621,142 @@ const LineWithHistogram = (props) => {
|
|
|
2620
2621
|
position: "relative",
|
|
2621
2622
|
width: "100%",
|
|
2622
2623
|
height: "100%",
|
|
2623
|
-
}, children: jsx(Plot$
|
|
2624
|
+
}, children: jsx(Plot$2, { data: plotlyData, layout: layout, config: config, useResizeHandler: true, style: {
|
|
2624
2625
|
width: "100%",
|
|
2625
2626
|
height: "100%",
|
|
2626
2627
|
display: "block",
|
|
2627
2628
|
transition: "opacity 0.15s ease-in-out",
|
|
2628
|
-
}, revision: revision }, `lineplot-${plotId || "default"}`) }), jsx("div", { style: { display: "none" }, children: jsx(Plot$
|
|
2629
|
+
}, revision: revision }, `lineplot-${plotId || "default"}`) }), jsx("div", { style: { display: "none" }, children: jsx(Plot$2, { data: histogramPlotlyData, layout: { width: 400, height: 300 }, onInitialized: handlePlotInitialized }, `hidden-histogram-${plotId || "default"}-${hiddenPlotKey}`) })] }) }));
|
|
2630
|
+
};
|
|
2631
|
+
|
|
2632
|
+
const Plot$1 = lazy(() => Promise.resolve().then(function () { return reactPlotlyWrapper$1; }));
|
|
2633
|
+
const SPLIT = 0.33;
|
|
2634
|
+
const GAP = 0.03;
|
|
2635
|
+
// Stacked subplots sharing a single x-axis: histogram on top (yaxis2), line on bottom (yaxis).
|
|
2636
|
+
// Because both traces use xaxis "x", hovermode "x unified" spans both panels simultaneously.
|
|
2637
|
+
// histogramData.x must be in the same domain as lineData.x for hover to be meaningful.
|
|
2638
|
+
const LineOnHistogram = (props) => {
|
|
2639
|
+
const { lineData, histogramData, title, xAxisTitle, yAxisTitle, y2AxisTitle, containerStyleOverrides, plotId = "lineplot", extraLayoutConfig = {}, revision = 0, } = props;
|
|
2640
|
+
const sharedAxisStyle = {
|
|
2641
|
+
showgrid: true,
|
|
2642
|
+
zeroline: false,
|
|
2643
|
+
showline: true,
|
|
2644
|
+
mirror: "ticks",
|
|
2645
|
+
gridcolor: "rgba(239, 239, 239, 0.5)",
|
|
2646
|
+
gridwidth: 0.2,
|
|
2647
|
+
linecolor: "#bababa",
|
|
2648
|
+
linewidth: 1,
|
|
2649
|
+
fixedrange: true,
|
|
2650
|
+
};
|
|
2651
|
+
const lineDataTimes = lineData.x.map((d) => d.getTime());
|
|
2652
|
+
const adjustedBinSize = lineDataTimes.length > 1 &&
|
|
2653
|
+
Math.max(...lineDataTimes) - Math.min(...lineDataTimes) > ONEAVGMONTH * 6
|
|
2654
|
+
? ONEWEEK
|
|
2655
|
+
: ONEDAY;
|
|
2656
|
+
const lineMarkerSymbols = lineData.x.map((d, i) => {
|
|
2657
|
+
if (i === 0) {
|
|
2658
|
+
return "arrow-up";
|
|
2659
|
+
}
|
|
2660
|
+
if (i === lineData.x.length - 1) {
|
|
2661
|
+
return "arrow-up";
|
|
2662
|
+
}
|
|
2663
|
+
return "circle";
|
|
2664
|
+
});
|
|
2665
|
+
const lineMarkerSymbolStandoff = lineData.x.map((d, i) => {
|
|
2666
|
+
if (i === 0) {
|
|
2667
|
+
return -6;
|
|
2668
|
+
}
|
|
2669
|
+
if (i === lineData.x.length - 1) {
|
|
2670
|
+
return -6;
|
|
2671
|
+
}
|
|
2672
|
+
return 0;
|
|
2673
|
+
});
|
|
2674
|
+
const lineMarkerSymbolAngles = lineData.x.map((d, i) => {
|
|
2675
|
+
if (i === 0) {
|
|
2676
|
+
return -90;
|
|
2677
|
+
}
|
|
2678
|
+
if (i === lineData.x.length - 1) {
|
|
2679
|
+
return 90;
|
|
2680
|
+
}
|
|
2681
|
+
return 0;
|
|
2682
|
+
});
|
|
2683
|
+
const plotlyData = [
|
|
2684
|
+
{
|
|
2685
|
+
type: "histogram",
|
|
2686
|
+
x: histogramData.x,
|
|
2687
|
+
xaxis: "x",
|
|
2688
|
+
yaxis: "y",
|
|
2689
|
+
xbins: histogramData.x.length > 0
|
|
2690
|
+
? {
|
|
2691
|
+
size: adjustedBinSize,
|
|
2692
|
+
start: roundToPrevDay(Math.min(...histogramData.x.map((d) => new Date(d).getTime()))),
|
|
2693
|
+
end: new Date(Math.max(...histogramData.x.map((d) => new Date(d).getTime())) +
|
|
2694
|
+
adjustedBinSize).toISOString(),
|
|
2695
|
+
}
|
|
2696
|
+
: undefined,
|
|
2697
|
+
name: histogramData.name || "histogram",
|
|
2698
|
+
marker: {
|
|
2699
|
+
color: histogramData.color || "rgb(211, 211, 212)",
|
|
2700
|
+
line: { color: "white", width: 0.5 },
|
|
2701
|
+
},
|
|
2702
|
+
hovertemplate: histogramData.hovertemplate || "Count: %{y}<extra></extra>",
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
// Invisible dummy trace — forces xaxis2 (top x-axis) to render
|
|
2706
|
+
type: "scatter",
|
|
2707
|
+
x: histogramData.x.slice(0, 1),
|
|
2708
|
+
y: [null],
|
|
2709
|
+
xaxis: "x2",
|
|
2710
|
+
yaxis: "y2",
|
|
2711
|
+
mode: "markers",
|
|
2712
|
+
marker: { opacity: 0, size: 0.1 },
|
|
2713
|
+
hoverinfo: "skip",
|
|
2714
|
+
showlegend: false,
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
type: "scatter",
|
|
2718
|
+
mode: "lines+markers",
|
|
2719
|
+
x: lineData.x,
|
|
2720
|
+
y: lineData.y,
|
|
2721
|
+
xaxis: "x",
|
|
2722
|
+
yaxis: "y2",
|
|
2723
|
+
name: lineData.name,
|
|
2724
|
+
line: { color: lineData.color || "#1f77b4", shape: "hv" },
|
|
2725
|
+
marker: {
|
|
2726
|
+
color: lineData.color || "#1f77b4",
|
|
2727
|
+
size: 6,
|
|
2728
|
+
symbol: lineMarkerSymbols,
|
|
2729
|
+
// @ts-ignore
|
|
2730
|
+
standoff: lineMarkerSymbolStandoff,
|
|
2731
|
+
angle: lineMarkerSymbolAngles,
|
|
2732
|
+
},
|
|
2733
|
+
hovertemplate: lineData.hovertemplate || "%{y}<extra></extra>",
|
|
2734
|
+
},
|
|
2735
|
+
];
|
|
2736
|
+
const layout = Object.assign(Object.assign({}, extraLayoutConfig), { title: { text: title }, showlegend: false, autosize: true, width: undefined, height: undefined, hovermode: "x unified", margin: { l: 50, r: 20, t: title ? 50 : 40, b: 50, pad: 4 }, xaxis: Object.assign(Object.assign({}, sharedAxisStyle), { title: { text: xAxisTitle }, domain: [0, 1], anchor: "y", ticklen: 4, tickcolor: "white",
|
|
2737
|
+
//@ts-ignore
|
|
2738
|
+
unifiedhovertitle: {
|
|
2739
|
+
text: "%{x|%B %d, %Y}",
|
|
2740
|
+
} }), xaxis2: Object.assign(Object.assign({}, sharedAxisStyle), { overlaying: "x", matches: "x", side: "top", anchor: "y2", ticklen: 4, tickcolor: "white" }), yaxis: Object.assign(Object.assign({}, sharedAxisStyle), { domain: [0, SPLIT - GAP / 2], anchor: "x", title: {
|
|
2741
|
+
text: yAxisTitle || "",
|
|
2742
|
+
standoff: 12,
|
|
2743
|
+
}, automargin: true, gridcolor: "#efefef", tickcolor: "white", ticklen: 10 }), yaxis2: Object.assign(Object.assign({}, sharedAxisStyle), { domain: [SPLIT + GAP / 2, 1], anchor: "x", showgrid: false, zeroline: false, showline: true, linecolor: "#bababa", linewidth: 1, fixedrange: true, title: {
|
|
2744
|
+
text: y2AxisTitle || "Count",
|
|
2745
|
+
standoff: 12,
|
|
2746
|
+
}, nticks: new Set(lineData.y).size === 1 ? 1 : undefined, tickvals: new Set(lineData.y).size === 1 ? [lineData.y[0]] : undefined }) });
|
|
2747
|
+
const config = {
|
|
2748
|
+
responsive: true,
|
|
2749
|
+
displayModeBar: false,
|
|
2750
|
+
displaylogo: false,
|
|
2751
|
+
scrollZoom: false,
|
|
2752
|
+
staticPlot: false,
|
|
2753
|
+
};
|
|
2754
|
+
return (jsx("div", { style: Object.assign({ width: "100%", height: "100%", position: "relative" }, containerStyleOverrides), children: jsx(Suspense, { fallback: jsx(Loading, {}), children: jsx(Plot$1, { data: plotlyData, layout: layout, config: config, useResizeHandler: true, style: {
|
|
2755
|
+
width: "100%",
|
|
2756
|
+
height: "100%",
|
|
2757
|
+
display: "block",
|
|
2758
|
+
transition: "opacity 0.15s ease-in-out",
|
|
2759
|
+
}, revision: revision }, `lineplot-${plotId || "default"}`) }) }));
|
|
2629
2760
|
};
|
|
2630
2761
|
|
|
2631
2762
|
const Plot = lazy(() => Promise.resolve().then(function () { return reactPlotlyWrapper$1; }));
|
|
@@ -100555,5 +100686,5 @@ var reactPlotlyWrapper$1 = /*#__PURE__*/Object.freeze({
|
|
|
100555
100686
|
default: reactPlotlyWrapper
|
|
100556
100687
|
});
|
|
100557
100688
|
|
|
100558
|
-
export { BarPlot, BoxPlot, HistogramPlot, LegendColorItem, LegendLineItem, LineWithHistogram, PairedComparisonsBoxPlot, RadialHistogramPlot, SplitBoxPlot, StatsDonut, SummaryComparisonPlot, SummaryComparisonPlotLegend, isDateArray, isNumberArray };
|
|
100689
|
+
export { BarPlot, BoxPlot, HistogramPlot, LegendColorItem, LegendLineItem, LineOnHistogram, LineWithHistogram, PairedComparisonsBoxPlot, RadialHistogramPlot, SplitBoxPlot, StatsDonut, SummaryComparisonPlot, SummaryComparisonPlotLegend, isDateArray, isNumberArray };
|
|
100559
100690
|
//# sourceMappingURL=index.esm.js.map
|