synapse-react-client 2.0.56 → 2.0.57
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.
|
@@ -4,8 +4,10 @@ export declare type PlotlyWrapperProps = {
|
|
|
4
4
|
data: Plotly.Data[];
|
|
5
5
|
layout?: Partial<Plotly.Layout>;
|
|
6
6
|
config?: Partial<Plotly.Config>;
|
|
7
|
+
useResizeHandler?: boolean;
|
|
7
8
|
className?: string;
|
|
8
9
|
containerWidth?: number;
|
|
10
|
+
plotStyle?: React.CSSProperties;
|
|
9
11
|
};
|
|
10
12
|
declare const PlotlyWrapper: React.FC<PlotlyWrapperProps>;
|
|
11
13
|
export default PlotlyWrapper;
|
|
@@ -7,15 +7,13 @@ var factory_1 = (0, tslib_1.__importDefault)(require("react-plotly.js/factory"))
|
|
|
7
7
|
// We must use the createPlotlyComponent factory method because we use plotly.js-basic-dist and not plotly.js
|
|
8
8
|
var Plot = (0, factory_1.default)(plotly_js_basic_dist_1.default);
|
|
9
9
|
var PlotlyWrapper = function (props) {
|
|
10
|
-
var data = props.data, layout = props.layout, config = props.config, className = props.className, containerWidth = props.containerWidth;
|
|
10
|
+
var data = props.data, layout = props.layout, config = props.config, className = props.className, containerWidth = props.containerWidth, useResizeHandler = props.useResizeHandler, plotStyle = props.plotStyle;
|
|
11
11
|
var hasData = !!(data && data.length);
|
|
12
12
|
return (React.createElement("div", { className: className },
|
|
13
|
-
!hasData &&
|
|
14
|
-
React.createElement(
|
|
15
|
-
React.createElement("
|
|
16
|
-
|
|
17
|
-
hasData &&
|
|
18
|
-
React.createElement(Plot, { data: data, layout: layout !== null && layout !== void 0 ? layout : {}, config: config })));
|
|
13
|
+
!hasData && (React.createElement(React.Fragment, null,
|
|
14
|
+
React.createElement("div", { className: 'chart-nodata', style: { width: containerWidth } },
|
|
15
|
+
React.createElement("span", null, "Data Unavailable")))),
|
|
16
|
+
hasData && (React.createElement(Plot, { data: data, layout: layout !== null && layout !== void 0 ? layout : {}, config: config, useResizeHandler: useResizeHandler, style: plotStyle }))));
|
|
19
17
|
};
|
|
20
18
|
exports.default = PlotlyWrapper;
|
|
21
19
|
//# sourceMappingURL=PlotlyWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlotlyWrapper.js","sourceRoot":"","sources":["../../src/lib/containers/PlotlyWrapper.tsx"],"names":[],"mappings":";;;AAAA,2FAAyC;AACzC,wDAA8B;AAC9B,iFAA2D;AAE3D,6GAA6G;AAC7G,IAAM,IAAI,GAAG,IAAA,iBAAqB,EAAC,8BAAM,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"PlotlyWrapper.js","sourceRoot":"","sources":["../../src/lib/containers/PlotlyWrapper.tsx"],"names":[],"mappings":";;;AAAA,2FAAyC;AACzC,wDAA8B;AAC9B,iFAA2D;AAE3D,6GAA6G;AAC7G,IAAM,IAAI,GAAG,IAAA,iBAAqB,EAAC,8BAAM,CAAC,CAAA;AAY1C,IAAM,aAAa,GAAiC,UAAA,KAAK;IAErD,IAAA,IAAI,GAOF,KAAK,KAPH,EACJ,MAAM,GAMJ,KAAK,OAND,EACN,MAAM,GAKJ,KAAK,OALD,EACN,SAAS,GAIP,KAAK,UAJE,EACT,cAAc,GAGZ,KAAK,eAHO,EACd,gBAAgB,GAEd,KAAK,iBAFS,EAChB,SAAS,GACP,KAAK,UADE,CACF;IACT,IAAM,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAA;IAEvC,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS;QACtB,CAAC,OAAO,IAAI,CACX;YACE,6BAAK,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;gBAC9D,qDAA6B,CACzB,CACL,CACJ;QACA,OAAO,IAAI,CACV,oBAAC,IAAI,IACH,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EACpB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,SAAS,GAChB,CACH,CACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,aAAa,CAAA"}
|