@wavemaker/react-runtime 11.14.3-rc.6401 → 11.15.0-2.247
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/actions/base-action.js +5 -7
- package/actions/login-action.js +7 -8
- package/actions/logout-action.js +5 -7
- package/actions/navigation-action.js +73 -18
- package/actions/notification-action.js +22 -8
- package/actions/timer-action.js +13 -15
- package/actions/toast.js +4 -2
- package/actions/toast.service.js +1 -2
- package/components/advanced/carousel/index.js +1 -1
- package/components/advanced/carousel/template.js +1 -1
- package/components/basic/anchor/index.js +31 -11
- package/components/basic/html/index.js +115 -24
- package/components/basic/icon/index.js +2 -1
- package/components/basic/iframe/index.js +2 -1
- package/components/basic/label/index.js +12 -9
- package/components/basic/message/index.js +12 -3
- package/components/basic/picture/index.js +11 -4
- package/components/basic/progress-bar/index.js +4 -1
- package/components/basic/progress-circle/index.js +34 -28
- package/components/basic/progress-circle/props.js +10 -2
- package/components/basic/richtexteditor/index.js +95 -94
- package/components/basic/search/index.js +401 -156
- package/components/basic/search/providers.js +126 -61
- package/components/basic/spinner/index.js +2 -1
- package/components/basic/tree/index.js +34 -34
- package/components/basic/tree/utils.js +10 -4
- package/components/chart/components/barColumnChart/index.js +36 -33
- package/components/chart/components/bubbleChart/index.js +35 -25
- package/components/chart/components/chartLegend/utils.js +2 -1
- package/components/chart/components/cumulativeLineChart/index.js +30 -26
- package/components/chart/components/lineAreaChart/index.js +50 -32
- package/components/chart/components/pieDonutChart/index.js +13 -4
- package/components/chart/hooks/useXAxisConfig.js +15 -8
- package/components/chart/index.js +223 -53
- package/components/chart/utils.js +12 -1
- package/components/constants.js +5 -2
- package/components/container/accordion/accordion-pane/index.js +17 -12
- package/components/container/accordion/index.js +9 -4
- package/components/container/alignment-utils.js +56 -1
- package/components/container/index.js +49 -20
- package/components/container/panel/components/panel-header/index.js +3 -4
- package/components/container/panel/index.js +15 -10
- package/components/container/repeat-template/index.js +33 -0
- package/components/container/tabs/index.js +83 -14
- package/components/container/tabs/tab-pane/index.js +33 -10
- package/components/container/tabs/utils.js +51 -0
- package/components/container/wizard/components/StepComponents.js +2 -1
- package/components/container/wizard/components/WizardStep.js +2 -1
- package/components/container/wizard/index.js +64 -35
- package/components/container/wizard/utils.js +46 -1
- package/components/container/wizard/wizard-step/index.js +11 -1
- package/components/data/card/card-content/index.js +1 -1
- package/components/data/form/base-form/index.js +985 -183
- package/components/data/form/base-form/props.js +3 -1
- package/components/data/form/base-form/utils.js +159 -1
- package/components/data/form/dynamic-fields/constant.js +53 -0
- package/components/data/form/dynamic-fields/index.js +10 -45
- package/components/data/form/dynamic-fields/utils.js +37 -2
- package/components/data/form/form-action/index.js +5 -4
- package/components/data/form/form-context.js +5 -1
- package/components/data/form/form-controller/utils.js +84 -0
- package/components/data/form/form-controller/validation-contrustor.js +402 -189
- package/components/data/form/form-controller/withFormController.js +191 -52
- package/components/data/form/form-field/base-field.js +67 -45
- package/components/data/form/form-field/index.js +28 -5
- package/components/data/form/form-header/index.js +3 -4
- package/components/data/form/index.js +20 -1
- package/components/data/list/components/ListDND.js +2 -1
- package/components/data/list/components/ListItem.js +6 -2
- package/components/data/list/components/ListItemWithTemplate.js +46 -2
- package/components/data/list/components/ListItems.js +17 -26
- package/components/data/list/components/ListPagination.js +3 -3
- package/components/data/list/components/StandardListItems.js +3 -4
- package/components/data/list/hooks/useListEffects.js +55 -14
- package/components/data/list/hooks/useListEventHandlers.js +3 -1
- package/components/data/list/hooks/useListState.js +3 -1
- package/components/data/list/hooks/usePaginatedGroupedData.js +18 -5
- package/components/data/list/index.js +74 -55
- package/components/data/list/utils/list-helpers.js +73 -35
- package/components/data/list/utils/list-widget-methods.js +138 -95
- package/components/data/live-filter/index.js +26 -15
- package/components/data/live-form/index.js +51 -18
- package/components/data/live-form/props.js +1 -1
- package/components/data/pagination/components/BasicPagination.js +71 -16
- package/components/data/pagination/components/PageSizeSelector.js +8 -3
- package/components/data/pagination/components/TotalRecords.js +1 -5
- package/components/data/pagination/hooks/usePagination.js +349 -66
- package/components/data/pagination/index.js +137 -19
- package/components/data/table/components/AddNewRow.js +5 -1
- package/components/data/table/components/EditableCell.js +2 -2
- package/components/data/table/components/RowCells.js +64 -0
- package/components/data/table/components/RowExpansionButton.js +2 -2
- package/components/data/table/components/SummaryCell.js +111 -0
- package/components/data/table/components/SummaryRow.js +54 -0
- package/components/data/table/components/SummaryRowFooter.js +46 -0
- package/components/data/table/components/TableBody.js +61 -59
- package/components/data/table/components/TableDataRow.js +109 -0
- package/components/data/table/components/TableFilters.js +225 -121
- package/components/data/table/components/TableHeader.js +291 -23
- package/components/data/table/components/TablePanelHeading.js +139 -8
- package/components/data/table/components/index.js +22 -1
- package/components/data/table/hooks/use-edited-rows.js +141 -0
- package/components/data/table/hooks/useCellState.js +5 -12
- package/components/data/table/hooks/useFormWidget.js +58 -52
- package/components/data/table/hooks/usePaginationState.js +45 -24
- package/components/data/table/hooks/usePanelStructure.js +4 -4
- package/components/data/table/hooks/useRowHandlers.js +39 -5
- package/components/data/table/hooks/useRowSelection.js +244 -50
- package/components/data/table/hooks/useServerSideSorting.js +81 -37
- package/components/data/table/hooks/useTableColumns.js +211 -118
- package/components/data/table/hooks/useTableData.js +54 -9
- package/components/data/table/hooks/useTableEdit.js +272 -97
- package/components/data/table/hooks/useTableEffects.js +31 -13
- package/components/data/table/hooks/useTableFilter.js +1 -1
- package/components/data/table/hooks/useTableInitialization.js +23 -22
- package/components/data/table/hooks/useTableState.js +11 -5
- package/components/data/table/hooks/useTableStateManager.js +140 -65
- package/components/data/table/index.js +637 -274
- package/components/data/table/live-table/index.js +54 -22
- package/components/data/table/table-action/index.js +1 -1
- package/components/data/table/table-group/index.js +26 -0
- package/components/data/table/table-row-action/index.js +32 -18
- package/components/data/table/utils/buildSelectionColumns.js +12 -21
- package/components/data/table/utils/columnBuilder.js +29 -14
- package/components/data/table/utils/columnProxy.js +68 -1
- package/components/data/table/utils/constants.js +6 -2
- package/components/data/table/utils/crud-handlers.js +68 -63
- package/components/data/table/utils/groupHeaderUtils.js +102 -0
- package/components/data/table/utils/index.js +210 -21
- package/components/data/table/utils/renderDisplayCell.js +6 -6
- package/components/data/table/utils/selectionUtils.js +25 -26
- package/components/data/table/utils/validation.js +1 -0
- package/components/data/utils/filter-field-util.js +3 -3
- package/components/dialogs/alert-dialog/index.js +1 -1
- package/components/dialogs/confirm-dialog/index.js +1 -1
- package/components/dialogs/dialog/index.js +4 -1
- package/components/dialogs/dialog-content/index.js +3 -1
- package/components/dialogs/dialog-header/index.js +2 -2
- package/components/dialogs/iframe-dialog/index.js +11 -5
- package/components/dialogs/index.js +1 -1
- package/components/dialogs/login-dialog/index.js +1 -1
- package/components/dialogs/page-dialog/index.js +1 -1
- package/components/form/button/index.js +33 -7
- package/components/input/calendar/index.js +18 -6
- package/components/input/chips/index.js +99 -28
- package/components/input/chips/utils.js +34 -4
- package/components/input/color-picker/index.js +74 -25
- package/components/input/composite/index.js +3 -3
- package/components/input/currency/index.js +35 -49
- package/components/input/default/checkbox/index.js +23 -28
- package/components/input/default/checkboxset/index.js +38 -18
- package/components/input/default/checkboxset/utils.js +30 -0
- package/components/input/default/radioset/index.js +36 -39
- package/components/input/default/switch/index.js +30 -13
- package/components/input/epoch/date/index.js +130 -69
- package/components/input/epoch/date/utils.js +94 -1
- package/components/input/epoch/datetime/index.js +72 -22
- package/components/input/epoch/datetime/utils.js +49 -10
- package/components/input/epoch/time/index.js +68 -19
- package/components/input/epoch/time/utils.js +62 -14
- package/components/input/fileupload/Utils.js +12 -7
- package/components/input/fileupload/components/MultiUpload.js +2 -6
- package/components/input/fileupload/components/SingleUpload.js +3 -7
- package/components/input/fileupload/index.js +6 -10
- package/components/input/fileupload/useFileUpload.js +16 -5
- package/components/input/number/index.js +158 -43
- package/components/input/rating/index.js +90 -7
- package/components/input/select/index.js +209 -72
- package/components/input/slider/index.js +84 -26
- package/components/input/text/index.js +38 -18
- package/components/input/text/util.js +283 -130
- package/components/input/textarea/index.js +13 -10
- package/components/input/upload/index.js +124 -0
- package/components/input/upload/props.js +5 -0
- package/components/input/util/index.js +11 -0
- package/components/navbar/index.js +51 -3
- package/components/navbar/nav/index.js +46 -16
- package/components/navbar/nav-item/index.js +11 -5
- package/components/navigation/menu/components/ListItems.js +3 -0
- package/components/navigation/menu/constants.js +2 -1
- package/components/navigation/menu/hooks/useHoverState.hook.js +48 -0
- package/components/navigation/menu/hooks/useKeyboardMovements.hook.js +37 -0
- package/components/navigation/menu/hooks/useTransformedDataset.hook.js +15 -0
- package/components/navigation/menu/index.js +326 -188
- package/components/navigation/menu/utils/action-task.js +14 -0
- package/components/navigation/menu/utils/role-filter.js +76 -0
- package/components/navigation/popover/index.js +105 -32
- package/components/page/partial-container/index.js +34 -5
- package/components/prefab/index.js +2 -4
- package/context/PrefabContext.js +10 -6
- package/context/WidgetProvider.js +30 -31
- package/core/app.service.js +1 -1
- package/core/constants/events.js +57 -1
- package/core/dialog.service.js +1 -2
- package/core/event-notifier.js +1 -2
- package/core/formatter/array-formatters.js +33 -0
- package/core/formatter/date-formatters.js +2 -4
- package/core/formatter/index.js +2 -1
- package/core/formatter/number-formatters.js +5 -10
- package/core/formatter/security-formatters.js +2 -4
- package/core/formatter/string-formatters.js +3 -6
- package/core/proxy-service.js +85 -13
- package/core/script-registry.js +108 -48
- package/core/util/common.js +4 -4
- package/core/util/compare.js +30 -0
- package/core/util/dom.js +8 -8
- package/core/util/index.js +16 -6
- package/core/util/safe-is-equal.js +156 -0
- package/core/util/security.js +1 -2
- package/core/util/utils.js +16 -7
- package/higherOrder/BaseApp.js +108 -65
- package/higherOrder/BaseDateTime.js +31 -13
- package/higherOrder/BasePage.js +268 -144
- package/higherOrder/BasePartial.js +1 -1
- package/higherOrder/BasePrefab.js +33 -15
- package/higherOrder/DataNav.js +99 -16
- package/higherOrder/helper.js +41 -3
- package/higherOrder/withBaseWrapper.js +41 -28
- package/hooks/useAuth.js +11 -5
- package/hooks/useHttp.js +280 -94
- package/mui-config/theme-provider.js +1 -1
- package/mui-config/theme.js +1 -1
- package/package-lock.json +423 -331
- package/package.json +8 -8
- package/store/bindActions/i18nActions.js +18 -0
- package/store/index.js +3 -1
- package/store/slices/appConfigSlice.js +2 -2
- package/store/slices/authSlice.js +31 -28
- package/store/slices/i18nSlice.js +2 -2
- package/store/slices/navigationSlice.js +35 -0
- package/store/viewport.service.js +255 -0
- package/utils/attr.js +35 -0
- package/utils/dataset-util.js +1 -2
- package/utils/form-state.util.js +43 -12
- package/utils/form-utils.js +47 -2
- package/utils/format-util.js +28 -13
- package/utils/page-params-util.js +33 -1
- package/utils/state-persistance.js +72 -13
- package/utils/transformedDataset-utils.js +35 -24
- package/variables/base-variable.js +12 -14
- package/variables/crud-variable.js +225 -0
- package/variables/live-variable.js +56 -20
- package/variables/metadata.service.js +123 -0
- package/variables/model-variable.js +21 -15
- package/variables/service-variable.js +88 -83
|
@@ -16,32 +16,32 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
16
16
|
var __jsx = _react["default"].createElement;
|
|
17
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
18
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
-
var BarColumnChart = exports.BarColumnChart = /*#__PURE__*/(0, _react.memo)(function (
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
legendPosition =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
tooltips =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
viewtype =
|
|
44
|
-
|
|
19
|
+
var BarColumnChart = exports.BarColumnChart = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
20
|
+
var _props$offsetleft, _props$offsetright, _props$offsettop, _props$offsetbottom;
|
|
21
|
+
var type = props.type,
|
|
22
|
+
data = props.data,
|
|
23
|
+
dataKeys = props.dataKeys,
|
|
24
|
+
selectedRegions = props.selectedRegions,
|
|
25
|
+
chartColors = props.chartColors,
|
|
26
|
+
margin = props.margin,
|
|
27
|
+
barSpacing = props.barSpacing,
|
|
28
|
+
showValues = props.showValues,
|
|
29
|
+
_props$legendPosition = props.legendPosition,
|
|
30
|
+
legendPosition = _props$legendPosition === void 0 ? "top" : _props$legendPosition,
|
|
31
|
+
xAxisConfig = props.xAxisConfig,
|
|
32
|
+
yAxisConfig = props.yAxisConfig,
|
|
33
|
+
numberFormat = props.numberFormat,
|
|
34
|
+
xDataKeyArr = props.xDataKeyArr,
|
|
35
|
+
onChartClick = props.onChartClick,
|
|
36
|
+
onLegendClick = props.onLegendClick,
|
|
37
|
+
_props$tooltips = props.tooltips,
|
|
38
|
+
tooltips = _props$tooltips === void 0 ? true : _props$tooltips,
|
|
39
|
+
_props$showLegend = props.showLegend,
|
|
40
|
+
showLegend = _props$showLegend === void 0 ? true : _props$showLegend,
|
|
41
|
+
legendtype = props.legendtype,
|
|
42
|
+
availableRegions = props.availableRegions,
|
|
43
|
+
_props$viewtype = props.viewtype,
|
|
44
|
+
viewtype = _props$viewtype === void 0 ? "Grouped" : _props$viewtype;
|
|
45
45
|
var isBarChart = type === "Bar"; // Bar = horizontal bars, Column = vertical bars
|
|
46
46
|
var isStacked = viewtype === "Stacked";
|
|
47
47
|
var formatValue = (0, _react.useCallback)(function (label) {
|
|
@@ -58,8 +58,11 @@ var BarColumnChart = exports.BarColumnChart = /*#__PURE__*/(0, _react.memo)(func
|
|
|
58
58
|
margin: margin,
|
|
59
59
|
layout: isBarChart ? "vertical" : "horizontal" // vertical layout = horizontal bars, horizontal layout = vertical bars
|
|
60
60
|
,
|
|
61
|
-
barGap: isStacked ? 0 : (0, _utils.getBarSpacingValue)(barSpacing
|
|
62
|
-
barCategoryGap:
|
|
61
|
+
barGap: isStacked ? 0 : barSpacing ? (0, _utils.getBarSpacingValue)(barSpacing !== null && barSpacing !== void 0 ? barSpacing : "0.5", "value") : undefined,
|
|
62
|
+
barCategoryGap: barSpacing ? (0, _utils.getBarSpacingValue)(barSpacing !== null && barSpacing !== void 0 ? barSpacing : "0.5", "value") : undefined,
|
|
63
|
+
style: {
|
|
64
|
+
transform: "translate(calc(".concat((_props$offsetleft = props.offsetleft) !== null && _props$offsetleft !== void 0 ? _props$offsetleft : 0, "px - ").concat((_props$offsetright = props.offsetright) !== null && _props$offsetright !== void 0 ? _props$offsetright : 0, "px), calc(").concat((_props$offsettop = props.offsettop) !== null && _props$offsettop !== void 0 ? _props$offsettop : 0, "px - ").concat((_props$offsetbottom = props.offsetbottom) !== null && _props$offsetbottom !== void 0 ? _props$offsetbottom : 0, "px))")
|
|
65
|
+
}
|
|
63
66
|
}, __jsx(_recharts.CartesianGrid, {
|
|
64
67
|
strokeDasharray: "3 3"
|
|
65
68
|
}), __jsx(_recharts.XAxis, isBarChart ? _objectSpread({
|
|
@@ -71,10 +74,10 @@ var BarColumnChart = exports.BarColumnChart = /*#__PURE__*/(0, _react.memo)(func
|
|
|
71
74
|
type: "category",
|
|
72
75
|
interval: 0
|
|
73
76
|
}, yAxisConfig) : yAxisConfig), tooltips && __jsx(_recharts.Tooltip, {
|
|
74
|
-
content: function content(
|
|
75
|
-
var active =
|
|
76
|
-
payload =
|
|
77
|
-
label =
|
|
77
|
+
content: function content(_ref) {
|
|
78
|
+
var active = _ref.active,
|
|
79
|
+
payload = _ref.payload,
|
|
80
|
+
label = _ref.label;
|
|
78
81
|
return __jsx(_chartTooltip.ChartTooltip, {
|
|
79
82
|
active: active,
|
|
80
83
|
payload: payload,
|
|
@@ -90,7 +93,7 @@ var BarColumnChart = exports.BarColumnChart = /*#__PURE__*/(0, _react.memo)(func
|
|
|
90
93
|
cursor: {
|
|
91
94
|
fill: "rgba(0, 0, 0, 0.1)"
|
|
92
95
|
}
|
|
93
|
-
}),
|
|
96
|
+
}), showLegend && __jsx(_recharts.Legend, {
|
|
94
97
|
content: function content(props) {
|
|
95
98
|
var _props$payload;
|
|
96
99
|
return __jsx(_chartLegend.ChartLegend, {
|
|
@@ -20,24 +20,25 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
20
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
21
|
// Define valid scatter shapes
|
|
22
22
|
var VALID_SHAPES = ["circle", "diamond", "square", "triangle"];
|
|
23
|
-
var BubbleChart = exports.BubbleChart = function BubbleChart(
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
tooltips =
|
|
39
|
-
|
|
40
|
-
shape =
|
|
23
|
+
var BubbleChart = exports.BubbleChart = function BubbleChart(props) {
|
|
24
|
+
var _props$offsetleft, _props$offsetright, _props$offsettop, _props$offsetbottom;
|
|
25
|
+
var data = props.data,
|
|
26
|
+
dataKeys = props.dataKeys,
|
|
27
|
+
selectedRegions = props.selectedRegions,
|
|
28
|
+
chartColors = props.chartColors,
|
|
29
|
+
margin = props.margin,
|
|
30
|
+
showLegend = props.showLegend,
|
|
31
|
+
legendPosition = props.legendPosition,
|
|
32
|
+
xAxisConfig = props.xAxisConfig,
|
|
33
|
+
yAxisConfig = props.yAxisConfig,
|
|
34
|
+
numberFormat = props.numberFormat,
|
|
35
|
+
xDataKeyArr = props.xDataKeyArr,
|
|
36
|
+
onLegendClick = props.onLegendClick,
|
|
37
|
+
onChartClick = props.onChartClick,
|
|
38
|
+
_props$tooltips = props.tooltips,
|
|
39
|
+
tooltips = _props$tooltips === void 0 ? true : _props$tooltips,
|
|
40
|
+
_props$shape = props.shape,
|
|
41
|
+
shape = _props$shape === void 0 ? "circle" : _props$shape;
|
|
41
42
|
var calculateDomain = function calculateDomain() {
|
|
42
43
|
var allValues = data.flatMap(function (item) {
|
|
43
44
|
return dataKeys.map(function (key) {
|
|
@@ -65,11 +66,17 @@ var BubbleChart = exports.BubbleChart = function BubbleChart(_ref) {
|
|
|
65
66
|
}, [data.length, shape]);
|
|
66
67
|
|
|
67
68
|
// Modified xAxis config to handle string values
|
|
69
|
+
// For bubble charts, x values are numeric indices (0, 1, 2...) with labels stored in xDataKeyArr
|
|
68
70
|
var modifiedXAxisConfig = _objectSpread(_objectSpread({}, xAxisConfig), {}, {
|
|
71
|
+
// Explicitly set ticks to only appear at valid data indices
|
|
72
|
+
ticks: xDataKeyArr && xDataKeyArr.length > 0 ? xDataKeyArr.map(function (_, i) {
|
|
73
|
+
return i;
|
|
74
|
+
}) : undefined,
|
|
69
75
|
tickFormatter: function tickFormatter(value, index) {
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
// Use the value (x coordinate = data index) to look up the label, not the tick index
|
|
77
|
+
var dataIndex = Math.round(value);
|
|
78
|
+
if (xDataKeyArr && Number.isInteger(dataIndex) && dataIndex >= 0 && dataIndex < xDataKeyArr.length && xDataKeyArr[dataIndex] !== undefined) {
|
|
79
|
+
var label = xDataKeyArr[dataIndex];
|
|
73
80
|
// Truncate long labels
|
|
74
81
|
return typeof label === "string" && label.length > 20 ? label.substring(0, 17) + "..." : label;
|
|
75
82
|
}
|
|
@@ -93,9 +100,9 @@ var BubbleChart = exports.BubbleChart = function BubbleChart(_ref) {
|
|
|
93
100
|
domain: domain,
|
|
94
101
|
range: range
|
|
95
102
|
}), tooltips && __jsx(_recharts.Tooltip, {
|
|
96
|
-
content: function content(
|
|
97
|
-
var active =
|
|
98
|
-
payload =
|
|
103
|
+
content: function content(_ref) {
|
|
104
|
+
var active = _ref.active,
|
|
105
|
+
payload = _ref.payload;
|
|
99
106
|
if (!active || !payload || !payload.length) return null;
|
|
100
107
|
|
|
101
108
|
// Get the x value and its corresponding label
|
|
@@ -147,7 +154,10 @@ var BubbleChart = exports.BubbleChart = function BubbleChart(_ref) {
|
|
|
147
154
|
width: "100%",
|
|
148
155
|
height: "100%"
|
|
149
156
|
}, __jsx(_recharts.ScatterChart, {
|
|
150
|
-
margin: margin
|
|
157
|
+
margin: margin,
|
|
158
|
+
style: {
|
|
159
|
+
transform: "translate(calc(".concat((_props$offsetleft = props.offsetleft) !== null && _props$offsetleft !== void 0 ? _props$offsetleft : 0, "px - ").concat((_props$offsetright = props.offsetright) !== null && _props$offsetright !== void 0 ? _props$offsetright : 0, "px), calc(").concat((_props$offsettop = props.offsettop) !== null && _props$offsettop !== void 0 ? _props$offsettop : 0, "px - ").concat((_props$offsetbottom = props.offsetbottom) !== null && _props$offsetbottom !== void 0 ? _props$offsetbottom : 0, "px))")
|
|
160
|
+
}
|
|
151
161
|
}, commonChartElements, dataKeys.map(function (dataKey, index) {
|
|
152
162
|
var _seriesData$;
|
|
153
163
|
var color = (chartColors === null || chartColors === void 0 ? void 0 : chartColors[index % ((chartColors === null || chartColors === void 0 ? void 0 : chartColors.length) || 1)]) || "#8884d8";
|
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.mapLegendItems = void 0;
|
|
7
7
|
var mapLegendItems = exports.mapLegendItems = function mapLegendItems(availableRegions, payload, chartColors) {
|
|
8
|
-
|
|
8
|
+
var _payload$length, _availableRegions$len;
|
|
9
|
+
if (!(availableRegions !== null && availableRegions !== void 0 && availableRegions.length) || ((_payload$length = payload === null || payload === void 0 ? void 0 : payload.length) !== null && _payload$length !== void 0 ? _payload$length : 0) > ((_availableRegions$len = availableRegions === null || availableRegions === void 0 ? void 0 : availableRegions.length) !== null && _availableRegions$len !== void 0 ? _availableRegions$len : 0)) {
|
|
9
10
|
return (payload || []).map(function (item) {
|
|
10
11
|
var _item$dataKey;
|
|
11
12
|
return {
|
|
@@ -18,41 +18,45 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
18
18
|
var __jsx = _react["default"].createElement;
|
|
19
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
-
var CumulativeLineChart = exports.CumulativeLineChart = function CumulativeLineChart(
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
tooltips =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
21
|
+
var CumulativeLineChart = exports.CumulativeLineChart = function CumulativeLineChart(props) {
|
|
22
|
+
var _props$offsetleft, _props$offsetright, _props$offsettop, _props$offsetbottom;
|
|
23
|
+
var data = props.data,
|
|
24
|
+
dataKeys = props.dataKeys,
|
|
25
|
+
selectedRegions = props.selectedRegions,
|
|
26
|
+
chartColors = props.chartColors,
|
|
27
|
+
margin = props.margin,
|
|
28
|
+
xAxisConfig = props.xAxisConfig,
|
|
29
|
+
yAxisConfig = props.yAxisConfig,
|
|
30
|
+
numberFormat = props.numberFormat,
|
|
31
|
+
xDataKeyArr = props.xDataKeyArr,
|
|
32
|
+
onLegendClick = props.onLegendClick,
|
|
33
|
+
_props$tooltips = props.tooltips,
|
|
34
|
+
tooltips = _props$tooltips === void 0 ? true : _props$tooltips,
|
|
35
|
+
interpolation = props.interpolation,
|
|
36
|
+
strokeWidth = props.strokeWidth,
|
|
37
|
+
pointSize = props.pointSize,
|
|
38
|
+
onChartClick = props.onChartClick,
|
|
39
|
+
showLegend = props.showLegend,
|
|
40
|
+
legendPosition = props.legendPosition,
|
|
41
|
+
legendtype = props.legendtype,
|
|
42
|
+
availableRegions = props.availableRegions;
|
|
42
43
|
var cumulativeData = (0, _react.useMemo)(function () {
|
|
43
44
|
return (0, _utils2.calculateCumulativeData)(data, dataKeys);
|
|
44
45
|
}, [data, dataKeys]);
|
|
45
46
|
var commonProps = {
|
|
46
47
|
data: cumulativeData,
|
|
47
|
-
margin: margin
|
|
48
|
+
margin: margin,
|
|
49
|
+
style: {
|
|
50
|
+
transform: "translate(calc(".concat((_props$offsetleft = props.offsetleft) !== null && _props$offsetleft !== void 0 ? _props$offsetleft : 0, "px - ").concat((_props$offsetright = props.offsetright) !== null && _props$offsetright !== void 0 ? _props$offsetright : 0, "px), calc(").concat((_props$offsettop = props.offsettop) !== null && _props$offsettop !== void 0 ? _props$offsettop : 0, "px - ").concat((_props$offsetbottom = props.offsetbottom) !== null && _props$offsetbottom !== void 0 ? _props$offsetbottom : 0, "px))")
|
|
51
|
+
}
|
|
48
52
|
};
|
|
49
53
|
var commonChartElements = __jsx(_react["default"].Fragment, null, __jsx(_recharts.CartesianGrid, {
|
|
50
54
|
strokeDasharray: "3 3"
|
|
51
55
|
}), __jsx(_recharts.XAxis, xAxisConfig), __jsx(_recharts.YAxis, yAxisConfig), tooltips && __jsx(_recharts.Tooltip, {
|
|
52
|
-
content: function content(
|
|
53
|
-
var active =
|
|
54
|
-
payload =
|
|
55
|
-
label =
|
|
56
|
+
content: function content(_ref) {
|
|
57
|
+
var active = _ref.active,
|
|
58
|
+
payload = _ref.payload,
|
|
59
|
+
label = _ref.label;
|
|
56
60
|
return __jsx(_chartTooltip.ChartTooltip, {
|
|
57
61
|
active: active,
|
|
58
62
|
payload: payload,
|
|
@@ -17,41 +17,46 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
17
17
|
var __jsx = _react["default"].createElement;
|
|
18
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
-
var LineAreaChart = exports.LineAreaChart = function LineAreaChart(
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
areaViewType =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
tooltips =
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
var LineAreaChart = exports.LineAreaChart = function LineAreaChart(props) {
|
|
21
|
+
var _props$offsetleft, _props$offsetright, _props$offsettop, _props$offsetbottom;
|
|
22
|
+
var type = props.type,
|
|
23
|
+
data = props.data,
|
|
24
|
+
dataKeys = props.dataKeys,
|
|
25
|
+
selectedRegions = props.selectedRegions,
|
|
26
|
+
chartColors = props.chartColors,
|
|
27
|
+
margin = props.margin,
|
|
28
|
+
showLegend = props.showLegend,
|
|
29
|
+
legendPosition = props.legendPosition,
|
|
30
|
+
xAxisConfig = props.xAxisConfig,
|
|
31
|
+
yAxisConfig = props.yAxisConfig,
|
|
32
|
+
numberFormat = props.numberFormat,
|
|
33
|
+
xDataKeyArr = props.xDataKeyArr,
|
|
34
|
+
interpolation = props.interpolation,
|
|
35
|
+
strokeWidth = props.strokeWidth,
|
|
36
|
+
pointSize = props.pointSize,
|
|
37
|
+
_props$areaViewType = props.areaViewType,
|
|
38
|
+
areaViewType = _props$areaViewType === void 0 ? "none" : _props$areaViewType,
|
|
39
|
+
onChartClick = props.onChartClick,
|
|
40
|
+
onLegendClick = props.onLegendClick,
|
|
41
|
+
_props$tooltips = props.tooltips,
|
|
42
|
+
tooltips = _props$tooltips === void 0 ? true : _props$tooltips,
|
|
43
|
+
legendtype = props.legendtype,
|
|
44
|
+
availableRegions = props.availableRegions,
|
|
45
|
+
onAreaSelect = props.onAreaSelect;
|
|
44
46
|
var commonProps = {
|
|
45
47
|
data: data,
|
|
46
|
-
margin: margin
|
|
48
|
+
margin: margin,
|
|
49
|
+
style: {
|
|
50
|
+
transform: "translate(calc(".concat((_props$offsetleft = props.offsetleft) !== null && _props$offsetleft !== void 0 ? _props$offsetleft : 0, "px - ").concat((_props$offsetright = props.offsetright) !== null && _props$offsetright !== void 0 ? _props$offsetright : 0, "px), calc(").concat((_props$offsettop = props.offsettop) !== null && _props$offsettop !== void 0 ? _props$offsettop : 0, "px - ").concat((_props$offsetbottom = props.offsetbottom) !== null && _props$offsetbottom !== void 0 ? _props$offsetbottom : 0, "px))")
|
|
51
|
+
}
|
|
47
52
|
};
|
|
48
53
|
var commonChartElements = __jsx(_react["default"].Fragment, null, __jsx(_recharts.CartesianGrid, {
|
|
49
54
|
strokeDasharray: "3 3"
|
|
50
55
|
}), __jsx(_recharts.XAxis, xAxisConfig), __jsx(_recharts.YAxis, yAxisConfig), tooltips && __jsx(_recharts.Tooltip, {
|
|
51
|
-
content: function content(
|
|
52
|
-
var active =
|
|
53
|
-
payload =
|
|
54
|
-
label =
|
|
56
|
+
content: function content(_ref) {
|
|
57
|
+
var active = _ref.active,
|
|
58
|
+
payload = _ref.payload,
|
|
59
|
+
label = _ref.label;
|
|
55
60
|
return __jsx(_chartTooltip.ChartTooltip, {
|
|
56
61
|
active: active,
|
|
57
62
|
payload: payload,
|
|
@@ -112,12 +117,19 @@ var LineAreaChart = exports.LineAreaChart = function LineAreaChart(_ref) {
|
|
|
112
117
|
fill: chartColors === null || chartColors === void 0 ? void 0 : chartColors[index % (chartColors === null || chartColors === void 0 ? void 0 : chartColors.length)],
|
|
113
118
|
onClick: onChartClick
|
|
114
119
|
},
|
|
115
|
-
|
|
120
|
+
activeDot: {
|
|
121
|
+
r: pointSize === 0 ? 2 : pointSize,
|
|
122
|
+
// in this way achieved similar effect as angular preview
|
|
123
|
+
strokeWidth: 1,
|
|
124
|
+
fill: chartColors === null || chartColors === void 0 ? void 0 : chartColors[index % (chartColors === null || chartColors === void 0 ? void 0 : chartColors.length)],
|
|
125
|
+
onClick: onChartClick
|
|
126
|
+
},
|
|
116
127
|
isAnimationActive: true,
|
|
117
128
|
hide: !selectedRegions.includes(dataKey)
|
|
118
129
|
});
|
|
119
130
|
})) : __jsx(_recharts.AreaChart, (0, _extends2["default"])({}, commonProps, {
|
|
120
|
-
stackOffset: areaViewType
|
|
131
|
+
stackOffset: areaViewType,
|
|
132
|
+
className: "area-chart-clickable-dots"
|
|
121
133
|
}), commonChartElements, dataKeys.map(function (dataKey, index) {
|
|
122
134
|
return __jsx(_recharts.Area, {
|
|
123
135
|
key: dataKey,
|
|
@@ -131,7 +143,13 @@ var LineAreaChart = exports.LineAreaChart = function LineAreaChart(_ref) {
|
|
|
131
143
|
r: pointSize,
|
|
132
144
|
strokeWidth: 1,
|
|
133
145
|
fill: chartColors === null || chartColors === void 0 ? void 0 : chartColors[index % (chartColors === null || chartColors === void 0 ? void 0 : chartColors.length)],
|
|
134
|
-
onClick:
|
|
146
|
+
onClick: onAreaSelect
|
|
147
|
+
},
|
|
148
|
+
activeDot: {
|
|
149
|
+
r: pointSize,
|
|
150
|
+
strokeWidth: 1,
|
|
151
|
+
fill: chartColors === null || chartColors === void 0 ? void 0 : chartColors[index % (chartColors === null || chartColors === void 0 ? void 0 : chartColors.length)],
|
|
152
|
+
onClick: onAreaSelect
|
|
135
153
|
},
|
|
136
154
|
isAnimationActive: true,
|
|
137
155
|
hide: !selectedRegions.includes(dataKey)
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.PieDonutChart = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _react = _interopRequireDefault(require("react"));
|
|
10
11
|
var _utils = require("../../utils");
|
|
11
12
|
var _recharts = require("recharts");
|
|
@@ -71,14 +72,17 @@ var PieDonutChart = exports.PieDonutChart = function PieDonutChart(_ref2) {
|
|
|
71
72
|
legendtype = _ref2.legendtype,
|
|
72
73
|
availableRegions = _ref2.availableRegions,
|
|
73
74
|
donutratio = _ref2.donutratio,
|
|
74
|
-
ynumberformat = _ref2.ynumberformat,
|
|
75
75
|
centerlabel = _ref2.centerlabel,
|
|
76
76
|
shouldShowLegend = _ref2.shouldShowLegend,
|
|
77
77
|
onChartClick = _ref2.onChartClick,
|
|
78
78
|
onLegendClick = _ref2.onLegendClick,
|
|
79
79
|
showLegend = _ref2.showLegend,
|
|
80
80
|
xDataKeyArr = _ref2.xDataKeyArr,
|
|
81
|
-
numberFormat = _ref2.numberFormat
|
|
81
|
+
numberFormat = _ref2.numberFormat,
|
|
82
|
+
offsetleft = _ref2.offsetleft,
|
|
83
|
+
offsettop = _ref2.offsettop,
|
|
84
|
+
offsetright = _ref2.offsetright,
|
|
85
|
+
offsetbottom = _ref2.offsetbottom;
|
|
82
86
|
var total = data.reduce(function (sum, item) {
|
|
83
87
|
return sum + item.value;
|
|
84
88
|
}, 0);
|
|
@@ -101,13 +105,18 @@ var PieDonutChart = exports.PieDonutChart = function PieDonutChart(_ref2) {
|
|
|
101
105
|
return __jsx("div", {
|
|
102
106
|
style: {
|
|
103
107
|
position: "relative",
|
|
108
|
+
minWidth: "300px",
|
|
104
109
|
width: "100%",
|
|
105
110
|
height: "100%"
|
|
106
111
|
}
|
|
107
112
|
}, __jsx(_recharts.ResponsiveContainer, {
|
|
108
113
|
width: "100%",
|
|
109
114
|
height: "100%"
|
|
110
|
-
}, __jsx(_recharts.PieChart,
|
|
115
|
+
}, __jsx(_recharts.PieChart, (0, _extends2["default"])({}, commonProps, {
|
|
116
|
+
style: {
|
|
117
|
+
transform: "translate(calc(".concat(offsetleft !== null && offsetleft !== void 0 ? offsetleft : 0, "px - ").concat(offsetright !== null && offsetright !== void 0 ? offsetright : 0, "px), calc(").concat(offsettop !== null && offsettop !== void 0 ? offsettop : 0, "px - ").concat(offsetbottom !== null && offsetbottom !== void 0 ? offsetbottom : 0, "px))")
|
|
118
|
+
}
|
|
119
|
+
}), __jsx(_recharts.Pie, {
|
|
111
120
|
data: filteredData,
|
|
112
121
|
dataKey: "value",
|
|
113
122
|
nameKey: "name",
|
|
@@ -124,7 +133,7 @@ var PieDonutChart = exports.PieDonutChart = function PieDonutChart(_ref2) {
|
|
|
124
133
|
isAnimationActive: true,
|
|
125
134
|
labelLine: false,
|
|
126
135
|
label: showlabels !== "hide" ? function (props) {
|
|
127
|
-
return renderCustomizedLabel(props, labeltype,
|
|
136
|
+
return renderCustomizedLabel(props, labeltype, numberFormat !== null && numberFormat !== void 0 ? numberFormat : "", total, showlabels);
|
|
128
137
|
} : false
|
|
129
138
|
}, filteredData.map(function (entry, index) {
|
|
130
139
|
return __jsx(_recharts.Cell, {
|
|
@@ -20,7 +20,9 @@ function useXAxisConfig(_ref) {
|
|
|
20
20
|
getDefaultXAxisLabel = _ref.getDefaultXAxisLabel,
|
|
21
21
|
xnumberformat = _ref.xnumberformat,
|
|
22
22
|
showxaxis = _ref.showxaxis,
|
|
23
|
-
xaxislabeldistance = _ref.xaxislabeldistance
|
|
23
|
+
xaxislabeldistance = _ref.xaxislabeldistance,
|
|
24
|
+
_ref$showxdistance = _ref.showxdistance,
|
|
25
|
+
showxdistance = _ref$showxdistance === void 0 ? false : _ref$showxdistance;
|
|
24
26
|
var xAxisConfig = (0, _react.useMemo)(function () {
|
|
25
27
|
var _chartContainerRef$cu;
|
|
26
28
|
var tickFontSize = 12;
|
|
@@ -35,14 +37,13 @@ function useXAxisConfig(_ref) {
|
|
|
35
37
|
return d === null || d === void 0 ? void 0 : d.x;
|
|
36
38
|
});
|
|
37
39
|
var displayLabels = rawLabels.length > 0 ? rawLabels.map(function (val, idx) {
|
|
38
|
-
var _v;
|
|
39
40
|
var v = val;
|
|
40
41
|
if (xnumberformat && typeof v === "number") {
|
|
41
42
|
v = (0, _utils.formatNumber)(v, xnumberformat);
|
|
42
43
|
} else if (xDataKeyArr.length > 0 && xDataKeyArr[idx] !== undefined) {
|
|
43
44
|
v = xDataKeyArr[idx];
|
|
44
45
|
}
|
|
45
|
-
return String(
|
|
46
|
+
return String(v !== null && v !== void 0 ? v : "");
|
|
46
47
|
}) : (xDataKeyArr || []).map(function (v) {
|
|
47
48
|
return String(v !== null && v !== void 0 ? v : "");
|
|
48
49
|
});
|
|
@@ -52,7 +53,6 @@ function useXAxisConfig(_ref) {
|
|
|
52
53
|
var mayOverlap = maxLabelChars * approxCharWidth > maxWidthPx;
|
|
53
54
|
var shouldStagger = type !== "Bar" && mayOverlap;
|
|
54
55
|
var XAxisTickWithTooltip = function XAxisTickWithTooltip(_ref2) {
|
|
55
|
-
var _displayValue;
|
|
56
56
|
var x = _ref2.x,
|
|
57
57
|
y = _ref2.y,
|
|
58
58
|
payload = _ref2.payload,
|
|
@@ -62,10 +62,16 @@ function useXAxisConfig(_ref) {
|
|
|
62
62
|
var displayValue = rawValue;
|
|
63
63
|
if (xnumberformat && typeof rawValue === "number") {
|
|
64
64
|
displayValue = (0, _utils.formatNumber)(rawValue, xnumberformat);
|
|
65
|
-
} else if (xDataKeyArr.length > 0
|
|
66
|
-
|
|
65
|
+
} else if (xDataKeyArr.length > 0) {
|
|
66
|
+
// For bubble/scatter charts, rawValue is the data index (numeric).
|
|
67
|
+
// Use rawValue to look up the label when it's a valid integer index.
|
|
68
|
+
// Fall back to tick index for other chart types where values match indices.
|
|
69
|
+
var dataIndex = typeof rawValue === "number" ? Math.round(rawValue) : index;
|
|
70
|
+
if (Number.isInteger(dataIndex) && dataIndex >= 0 && dataIndex < xDataKeyArr.length && xDataKeyArr[dataIndex] !== undefined) {
|
|
71
|
+
displayValue = xDataKeyArr[dataIndex];
|
|
72
|
+
}
|
|
67
73
|
}
|
|
68
|
-
var fullText = String(
|
|
74
|
+
var fullText = String(displayValue !== null && displayValue !== void 0 ? displayValue : "");
|
|
69
75
|
var needsEllipsis = fullText.length > maxChars;
|
|
70
76
|
var truncatedText = needsEllipsis ? fullText.slice(0, Math.max(0, maxChars - 1)) + "…" : fullText;
|
|
71
77
|
var textAnchor = "middle";
|
|
@@ -80,11 +86,12 @@ function useXAxisConfig(_ref) {
|
|
|
80
86
|
return {
|
|
81
87
|
hide: !showxaxis,
|
|
82
88
|
label: {
|
|
83
|
-
|
|
89
|
+
value: getDefaultXAxisLabel(),
|
|
84
90
|
position: "insideBottom",
|
|
85
91
|
offset: xaxislabeldistance,
|
|
86
92
|
fill: "#000"
|
|
87
93
|
},
|
|
94
|
+
tickLine: showxdistance,
|
|
88
95
|
// Ensure all x-axis labels render
|
|
89
96
|
interval: 0,
|
|
90
97
|
// Provide extra space only when staggering is needed
|