@vizzly/dashboard 0.15.0-dev-4c548c2a9cdc29d779838ea3325029fe7e640235 → 0.15.0-dev-b977a1154b349ec1e508214978bfd28cd7e5c26b
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/dashboard.esm.js
CHANGED
|
@@ -33414,26 +33414,28 @@ var Legend = function Legend(props) {
|
|
|
33414
33414
|
});
|
|
33415
33415
|
};
|
|
33416
33416
|
|
|
33417
|
-
var useXAxisLabelCount = function useXAxisLabelCount(override, forceXAxisAsTime) {
|
|
33417
|
+
var useXAxisLabelCount = function useXAxisLabelCount(override, forceXAxisAsTime, horizontal) {
|
|
33418
33418
|
var ref = useRef(null);
|
|
33419
33419
|
var _useState = useState(0),
|
|
33420
|
-
|
|
33421
|
-
|
|
33420
|
+
size = _useState[0],
|
|
33421
|
+
setSize = _useState[1];
|
|
33422
33422
|
useEffect(function () {
|
|
33423
33423
|
var handleResize = throttle(function () {
|
|
33424
|
-
|
|
33424
|
+
if (!ref.current) return;
|
|
33425
|
+
var measurement = horizontal ? ref.current.clientHeight : ref.current.clientWidth;
|
|
33426
|
+
setSize(measurement);
|
|
33425
33427
|
}, 100);
|
|
33426
33428
|
handleResize();
|
|
33427
|
-
window.addEventListener('resize',
|
|
33428
|
-
return handleResize;
|
|
33429
|
-
});
|
|
33429
|
+
window.addEventListener('resize', handleResize);
|
|
33430
33430
|
return function () {
|
|
33431
33431
|
window.removeEventListener('resize', handleResize);
|
|
33432
|
+
handleResize.cancel();
|
|
33432
33433
|
};
|
|
33433
33434
|
});
|
|
33434
|
-
|
|
33435
|
-
|
|
33436
|
-
|
|
33435
|
+
if (override !== 'auto') return [ref, override];
|
|
33436
|
+
var approximateTickCount = Math.min(size < 1000 ? parseInt(("" + size)[0]) : 12, 12);
|
|
33437
|
+
var multiplier = horizontal || forceXAxisAsTime ? 4 : 1;
|
|
33438
|
+
return [ref, approximateTickCount * multiplier];
|
|
33437
33439
|
};
|
|
33438
33440
|
|
|
33439
33441
|
var buildTooltipStyles = function buildTooltipStyles(_ref) {
|
|
@@ -34175,7 +34177,7 @@ var VizzlyXYChart = function VizzlyXYChart(props) {
|
|
|
34175
34177
|
scaleToFit: 'shrink-only'
|
|
34176
34178
|
};
|
|
34177
34179
|
};
|
|
34178
|
-
var _useXAxisLabelCount = useXAxisLabelCount(approxXAxisLabelCount,
|
|
34180
|
+
var _useXAxisLabelCount = useXAxisLabelCount(approxXAxisLabelCount, props == null ? void 0 : props.forceXAxisAsTime, props == null ? void 0 : props.horizontal),
|
|
34179
34181
|
widthRef = _useXAxisLabelCount[0],
|
|
34180
34182
|
approximateXTickCount = _useXAxisLabelCount[1];
|
|
34181
34183
|
var _useState = useState(undefined),
|
|
@@ -35741,9 +35743,6 @@ var AreaChart$4 = function AreaChart(props) {
|
|
|
35741
35743
|
globalFilters: props.globalFilters
|
|
35742
35744
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
35743
35745
|
queriesAreChanging = _useQueryEffect.queriesAreChanging;
|
|
35744
|
-
var componentInterface = getComponentInterface(props.component.attributes.type, {
|
|
35745
|
-
queryEngineConfig: props.dashboardBehaviour.queryEngineConfig
|
|
35746
|
-
});
|
|
35747
35746
|
return jsxs(Fragment, {
|
|
35748
35747
|
children: [jsx(memoized, _extends({
|
|
35749
35748
|
id: props.id
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly/dashboard",
|
|
3
3
|
"author": "james@vizzly.co",
|
|
4
|
-
"version": "0.15.0-dev-
|
|
4
|
+
"version": "0.15.0-dev-b977a1154b349ec1e508214978bfd28cd7e5c26b",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "./dist/dashboard/src/index.d.ts",
|
|
7
7
|
"module": "./dist/dashboard.esm.js",
|