impaktapps-design 0.2.993-alpha.239 → 0.2.993-alpha.240
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/impaktapps-design.es.js +9 -14
- package/dist/impaktapps-design.es.js.map +1 -1
- package/dist/impaktapps-design.umd.js +21 -21
- package/dist/impaktapps-design.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/component/AreaGraph/DrawAreaGraph.tsx +1 -4
- package/src/component/StackBarLineGraph/DrawStackBarLineGraph.tsx +1 -3
|
@@ -22170,7 +22170,7 @@ const DrawAreaGraph = ({
|
|
|
22170
22170
|
areaValue,
|
|
22171
22171
|
theme
|
|
22172
22172
|
}) => {
|
|
22173
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m
|
|
22173
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
22174
22174
|
const {
|
|
22175
22175
|
tooltipData,
|
|
22176
22176
|
tooltipLeft,
|
|
@@ -22188,7 +22188,6 @@ const DrawAreaGraph = ({
|
|
|
22188
22188
|
const legendLabels = (_g = areaValue.main) == null ? void 0 : _g.legendLabels;
|
|
22189
22189
|
const colorMap = (_i = (_h = areaValue.style) == null ? void 0 : _h.areaStyle) == null ? void 0 : _i.colorMap;
|
|
22190
22190
|
const defaultColour = (_k = (_j = theme.myTheme.palette) == null ? void 0 : _j.primary) == null ? void 0 : _k.main;
|
|
22191
|
-
const xAxisTickCount = (_l = areaValue == null ? void 0 : areaValue.main) == null ? void 0 : _l.xAxisTickCount;
|
|
22192
22191
|
const isSmallScreen = width2 < 600;
|
|
22193
22192
|
const longestLabelLength = useMemo(() => Math.max(...chartData.map((d2) => String(d2[xAxisValue]).length)), [chartData, xAxisValue]);
|
|
22194
22193
|
const dynamicBottomMargin = Math.ceil(longestLabelLength * PX_PER_CHAR$1 * LABEL_ROTATION$1);
|
|
@@ -22290,7 +22289,7 @@ const DrawAreaGraph = ({
|
|
|
22290
22289
|
const tickLabelProps = useCallback(() => isSmallScreen ? {
|
|
22291
22290
|
fill: "#6B7280",
|
|
22292
22291
|
fontSize: 12,
|
|
22293
|
-
fontWeight:
|
|
22292
|
+
fontWeight: 500,
|
|
22294
22293
|
textAnchor: "end",
|
|
22295
22294
|
angle: -40,
|
|
22296
22295
|
dx: "-0.2em",
|
|
@@ -22379,16 +22378,14 @@ const DrawAreaGraph = ({
|
|
|
22379
22378
|
}), /* @__PURE__ */ jsx$1(AxisBottom, {
|
|
22380
22379
|
top: innerHeight,
|
|
22381
22380
|
scale: xScale,
|
|
22382
|
-
label: (
|
|
22381
|
+
label: (_l = areaValue.main) == null ? void 0 : _l.bottomLabel,
|
|
22383
22382
|
tickFormat: formatXTick,
|
|
22384
22383
|
stroke: "#d1d5db",
|
|
22385
22384
|
tickStroke: "#d1d5db",
|
|
22386
|
-
tickTransform: xAxisType === "date" ? "translate(8, 0)" : void 0,
|
|
22387
|
-
numTicks: xAxisTickCount || 20,
|
|
22388
22385
|
tickLabelProps
|
|
22389
22386
|
}), /* @__PURE__ */ jsx$1(AxisLeft, {
|
|
22390
22387
|
scale: yScale,
|
|
22391
|
-
label: !disableLeftLabel ? (
|
|
22388
|
+
label: !disableLeftLabel ? (_m = areaValue.main) == null ? void 0 : _m.leftLabel : void 0,
|
|
22392
22389
|
stroke: "#d1d5db",
|
|
22393
22390
|
tickStroke: "#d1d5db",
|
|
22394
22391
|
numTicks: yAxisTickCount || 6,
|
|
@@ -22526,7 +22523,7 @@ const DrawStackBarLineGraph = ({
|
|
|
22526
22523
|
stackBarLineValue,
|
|
22527
22524
|
theme
|
|
22528
22525
|
}) => {
|
|
22529
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n
|
|
22526
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
22530
22527
|
const {
|
|
22531
22528
|
tooltipData,
|
|
22532
22529
|
tooltipLeft,
|
|
@@ -22543,8 +22540,7 @@ const DrawStackBarLineGraph = ({
|
|
|
22543
22540
|
const defaultColour = (_h = (_g = (_f = theme == null ? void 0 : theme.myTheme) == null ? void 0 : _f.palette) == null ? void 0 : _g.primary) == null ? void 0 : _h.main;
|
|
22544
22541
|
const yAxisTickCount = (_i = stackBarLineValue == null ? void 0 : stackBarLineValue.main) == null ? void 0 : _i.yAxisTickCount;
|
|
22545
22542
|
const disableLeftLabel = (_j = stackBarLineValue.main) == null ? void 0 : _j.disableLeftLabel;
|
|
22546
|
-
const
|
|
22547
|
-
const trendColor = (_l = colorMap == null ? void 0 : colorMap[GROWTH_RATE_KEY]) != null ? _l : "#E24B4A";
|
|
22543
|
+
const trendColor = (_k = colorMap == null ? void 0 : colorMap[GROWTH_RATE_KEY]) != null ? _k : "#E24B4A";
|
|
22548
22544
|
const isSmallScreen = width2 < 600;
|
|
22549
22545
|
const longestLabelLength = useMemo(() => Math.max(...chartData.map((d2) => String(d2[xAxisValue]).length)), [chartData, xAxisValue]);
|
|
22550
22546
|
const dynamicBottomMargin = Math.ceil(longestLabelLength * PX_PER_CHAR * LABEL_ROTATION);
|
|
@@ -22742,7 +22738,7 @@ const DrawStackBarLineGraph = ({
|
|
|
22742
22738
|
textAnchor: "end",
|
|
22743
22739
|
dy: "0.33em"
|
|
22744
22740
|
}),
|
|
22745
|
-
label: !disableLeftLabel ? (
|
|
22741
|
+
label: !disableLeftLabel ? (_l = stackBarLineValue.main) == null ? void 0 : _l.leftLabel : void 0,
|
|
22746
22742
|
labelProps: {
|
|
22747
22743
|
fill: "#6B7280",
|
|
22748
22744
|
fontSize: 11,
|
|
@@ -22754,7 +22750,7 @@ const DrawStackBarLineGraph = ({
|
|
|
22754
22750
|
scale: trendScale,
|
|
22755
22751
|
numTicks: 5,
|
|
22756
22752
|
stroke: "#9CA3AF",
|
|
22757
|
-
label: (
|
|
22753
|
+
label: (_m = stackBarLineValue.main) == null ? void 0 : _m.rightLabel,
|
|
22758
22754
|
tickStroke: "transparent",
|
|
22759
22755
|
tickLabelProps: () => ({
|
|
22760
22756
|
fill: "#6B7280",
|
|
@@ -22772,9 +22768,8 @@ const DrawStackBarLineGraph = ({
|
|
|
22772
22768
|
top: innerHeight,
|
|
22773
22769
|
scale: categoryScale,
|
|
22774
22770
|
stroke: "#9CA3AF",
|
|
22775
|
-
label: (
|
|
22771
|
+
label: (_n = stackBarLineValue.main) == null ? void 0 : _n.bottomLabel,
|
|
22776
22772
|
tickStroke: "transparent",
|
|
22777
|
-
numTicks: xAxisTickCount || 20,
|
|
22778
22773
|
tickLabelProps
|
|
22779
22774
|
})]
|
|
22780
22775
|
})
|