@elliemae/ds-dataviz 3.51.0-rc.2 → 3.51.0-rc.20
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/cjs/graphs/Chart/series/HorizontalStackedBars.js.map +2 -2
- package/dist/cjs/graphs/Chart/series/StackedBar.js.map +2 -2
- package/dist/cjs/index.js +3 -3
- package/dist/esm/graphs/Chart/series/HorizontalStackedBars.js.map +2 -2
- package/dist/esm/graphs/Chart/series/StackedBar.js.map +2 -2
- package/package.json +8 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/graphs/Chart/series/HorizontalStackedBars.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\nimport React, { useContext, useMemo } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const HorizontalStackedBars = ({ serie }: DSChartT.SerieComponentT) => {\n const {\n props: { groups },\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXScaleValue,\n getYValue,\n } = useContext(ChartContext);\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n\n return useMemo(\n () => (\n <g>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n const sequence0 = getXScaleValue(sequence[0]);\n const sequence1 = getXScaleValue(sequence[1]);\n const isFloorStack = sequence[0] === 0;\n const xValue = sequence[1] - sequence[0];\n const yValue = getYValue(serie.data[i]) as number;\n\n const width = sequence1 - sequence0 - (!isFloorStack ? 2 : 0);\n\n const height = subGroupScale?.bandwidth() ?? 0;\n const transformX = sequence0 + (!isFloorStack ? 2 : 0);\n const transformY =\n (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0) +\n (yScale?.get(yValue as never) ?? 0);\n return (\n <g key={serie.data[i]?.key} clipPath={`url(#rect-focus-ring-${chartId})`}>\n <g fill={colorScale(serie.name) as string} transform={`translate(0, ${transformY})`}>\n <Rect\n width={width}\n height={height}\n x={transformX}\n xValue={xValue}\n yValue={yValue}\n id={serie.data[i]?.key}\n name={serie.name}\n datum={serie.data[i]}\n />\n </g>\n </g>\n );\n })}\n </g>\n ),\n [\n chartId,\n colorScale,\n getXScaleValue,\n getYValue,\n serie.data,\n serie.name,\n serieWithStackedValues,\n stackIndex,\n subGroupScale,\n yScale,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* prettier-ignore */\nimport React, { useContext, useMemo } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const HorizontalStackedBars = ({ serie }: DSChartT.SerieComponentT) => {\n const {\n props: { groups },\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXScaleValue,\n getYValue,\n } = useContext(ChartContext);\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n\n return useMemo(\n () => (\n <g>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n const sequence0 = getXScaleValue(sequence[0]);\n const sequence1 = getXScaleValue(sequence[1]);\n const isFloorStack = sequence[0] === 0;\n const xValue = sequence[1] - sequence[0];\n const yValue = getYValue(serie.data[i]) as number;\n\n const width = sequence1 - sequence0 - (!isFloorStack ? 2 : 0);\n\n const height = subGroupScale?.bandwidth() ?? 0;\n const transformX = sequence0 + (!isFloorStack ? 2 : 0);\n const transformY =\n (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0) +\n (yScale?.get(yValue as never) ?? 0);\n return (\n <g key={serie.data[i]?.key} clipPath={`url(#rect-focus-ring-${chartId})`}>\n <g fill={colorScale(serie.name) as string} transform={`translate(0, ${transformY})`}>\n <Rect\n width={width}\n height={height}\n x={transformX}\n xValue={xValue}\n yValue={yValue}\n id={serie.data[i]?.key}\n name={serie.name}\n datum={serie.data[i]}\n />\n </g>\n </g>\n );\n })}\n </g>\n ),\n [\n chartId,\n colorScale,\n getXScaleValue,\n getYValue,\n serie.data,\n serie.name,\n serieWithStackedValues,\n stackIndex,\n subGroupScale,\n yScale,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2CP;AAzChB,mBAA2C;AAC3C,kBAAqB;AACrB,0BAA6B;AAC7B,qBAAgD;AAGzC,MAAM,wBAAwB,CAAC,EAAE,MAAM,MAAgC;AAC5E,QAAM;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,gCAAY;AAC3B,QAAM,6BAAyB,+BAAe,aAAa,KAAK;AAChE,QAAM,iBAAa,gCAAgB,QAAQ,MAAM,IAAI;AAErD,aAAO;AAAA,IACL,MACE,4CAAC,OACE,gBAAM,KAAK,IAAI,CAAC,KAAK,MAAM;AAC1B,YAAM,WAAW,yBAAyB,uBAAuB,IAAI,QAAQ,IAAI,CAAC,GAAG,CAAC;AACtF,YAAM,YAAY,eAAe,SAAS,CAAC,CAAC;AAC5C,YAAM,YAAY,eAAe,SAAS,CAAC,CAAC;AAC5C,YAAM,eAAe,SAAS,CAAC,MAAM;AACrC,YAAM,SAAS,SAAS,CAAC,IAAI,SAAS,CAAC;AACvC,YAAM,SAAS,UAAU,MAAM,KAAK,CAAC,CAAC;AAEtC,YAAM,QAAQ,YAAY,aAAa,CAAC,eAAe,IAAI;AAE3D,YAAM,SAAS,eAAe,UAAU,KAAK;AAC7C,YAAM,aAAa,aAAa,CAAC,eAAe,IAAI;AACpD,YAAM,cACH,gBAAiB,cAAc,gBAAgB,UAAU,EAAE,KAAK,IAAK,MACrE,QAAQ,IAAI,MAAe,KAAK;AACnC,aACE,4CAAC,OAA2B,UAAU,wBAAwB,OAAO,KACnE,sDAAC,OAAE,MAAM,WAAW,MAAM,IAAI,GAAa,WAAW,gBAAgB,UAAU,KAC9E;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,GAAG;AAAA,UACH;AAAA,UACA;AAAA,UACA,IAAI,MAAM,KAAK,CAAC,GAAG;AAAA,UACnB,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM,KAAK,CAAC;AAAA;AAAA,MACrB,GACF,KAZM,MAAM,KAAK,CAAC,GAAG,GAavB;AAAA,IAEJ,CAAC,GACH;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/graphs/Chart/series/StackedBar.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const StackedBar: React.ComponentType<DSChartT.SerieComponentT> = ({ serie }) => {\n const {\n props: { groups },\n xScale,\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXValue,\n getXScaleValue,\n } = useContext(ChartContext);\n\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n return (\n <g clipPath={`url(#rect-focus-ring-${chartId})`}>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n\n const isFloorStack = sequence[0] === 0;\n\n const xValue = getXValue(bar) as number;\n const xScaleValue = getXScaleValue(bar) ?? 0;\n const yValue = sequence[1] - sequence[0];\n const width = subGroupScale?.bandwidth() ?? 0;\n const height =\n (yScale?.get(sequence[0] as never) ?? 0) - (yScale?.get(sequence[1] as never) ?? 0) - (!isFloorStack ? 1 : 0);\n const transformY = (yScale?.get(sequence[1] as never) ?? 0) + (sequence[0] < 0 ? 2 : 0);\n\n const transformX =\n xScale?.type !== 'BAND'\n ? xScaleValue - width / 2\n : xScaleValue + (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0);\n return (\n <g key={serie.data[i].key} fill={colorScale(serie.name) as string} transform={`translate(${transformX},0)`}>\n <Rect\n width={width}\n height={height}\n xValue={xValue}\n yValue={yValue}\n y={transformY}\n id={serie.data[i].key}\n name={serie.name}\n datum={bar}\n />\n </g>\n );\n })}\n </g>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* prettier-ignore */\nimport React, { useContext } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const StackedBar: React.ComponentType<DSChartT.SerieComponentT> = ({ serie }) => {\n const {\n props: { groups },\n xScale,\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXValue,\n getXScaleValue,\n } = useContext(ChartContext);\n\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n return (\n <g clipPath={`url(#rect-focus-ring-${chartId})`}>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n\n const isFloorStack = sequence[0] === 0;\n\n const xValue = getXValue(bar) as number;\n const xScaleValue = getXScaleValue(bar) ?? 0;\n const yValue = sequence[1] - sequence[0];\n const width = subGroupScale?.bandwidth() ?? 0;\n const height =\n (yScale?.get(sequence[0] as never) ?? 0) - (yScale?.get(sequence[1] as never) ?? 0) - (!isFloorStack ? 1 : 0);\n const transformY = (yScale?.get(sequence[1] as never) ?? 0) + (sequence[0] < 0 ? 2 : 0);\n\n const transformX =\n xScale?.type !== 'BAND'\n ? xScaleValue - width / 2\n : xScaleValue + (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0);\n return (\n <g key={serie.data[i].key} fill={colorScale(serie.name) as string} transform={`translate(${transformX},0)`}>\n <Rect\n width={width}\n height={height}\n xValue={xValue}\n yValue={yValue}\n y={transformY}\n id={serie.data[i].key}\n name={serie.name}\n datum={bar}\n />\n </g>\n );\n })}\n </g>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4CX;AA1CZ,mBAAkC;AAClC,kBAAqB;AACrB,0BAA6B;AAC7B,qBAAgD;AAGzC,MAAM,aAA4D,CAAC,EAAE,MAAM,MAAM;AACtF,QAAM;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAA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
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var index_exports = {};
|
|
30
|
+
__export(index_exports, {
|
|
31
31
|
COLOR_PALLET: () => import_graphs.COLOR_PALLET,
|
|
32
32
|
Chart: () => import_graphs.Chart,
|
|
33
33
|
DSSingleStackedBar: () => import_graphs.DSSingleStackedBar,
|
|
34
34
|
DSSingleStackedBarWithSchema: () => import_graphs.DSSingleStackedBarWithSchema,
|
|
35
35
|
SERIE_TYPES: () => import_graphs.SERIE_TYPES
|
|
36
36
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(index_exports);
|
|
38
38
|
var React = __toESM(require("react"));
|
|
39
39
|
var import_graphs = require("./graphs/index.js");
|
|
40
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/graphs/Chart/series/HorizontalStackedBars.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useMemo } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const HorizontalStackedBars = ({ serie }: DSChartT.SerieComponentT) => {\n const {\n props: { groups },\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXScaleValue,\n getYValue,\n } = useContext(ChartContext);\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n\n return useMemo(\n () => (\n <g>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n const sequence0 = getXScaleValue(sequence[0]);\n const sequence1 = getXScaleValue(sequence[1]);\n const isFloorStack = sequence[0] === 0;\n const xValue = sequence[1] - sequence[0];\n const yValue = getYValue(serie.data[i]) as number;\n\n const width = sequence1 - sequence0 - (!isFloorStack ? 2 : 0);\n\n const height = subGroupScale?.bandwidth() ?? 0;\n const transformX = sequence0 + (!isFloorStack ? 2 : 0);\n const transformY =\n (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0) +\n (yScale?.get(yValue as never) ?? 0);\n return (\n <g key={serie.data[i]?.key} clipPath={`url(#rect-focus-ring-${chartId})`}>\n <g fill={colorScale(serie.name) as string} transform={`translate(0, ${transformY})`}>\n <Rect\n width={width}\n height={height}\n x={transformX}\n xValue={xValue}\n yValue={yValue}\n id={serie.data[i]?.key}\n name={serie.name}\n datum={serie.data[i]}\n />\n </g>\n </g>\n );\n })}\n </g>\n ),\n [\n chartId,\n colorScale,\n getXScaleValue,\n getYValue,\n serie.data,\n serie.name,\n serieWithStackedValues,\n stackIndex,\n subGroupScale,\n yScale,\n ],\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* prettier-ignore */\nimport React, { useContext, useMemo } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const HorizontalStackedBars = ({ serie }: DSChartT.SerieComponentT) => {\n const {\n props: { groups },\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXScaleValue,\n getYValue,\n } = useContext(ChartContext);\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n\n return useMemo(\n () => (\n <g>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n const sequence0 = getXScaleValue(sequence[0]);\n const sequence1 = getXScaleValue(sequence[1]);\n const isFloorStack = sequence[0] === 0;\n const xValue = sequence[1] - sequence[0];\n const yValue = getYValue(serie.data[i]) as number;\n\n const width = sequence1 - sequence0 - (!isFloorStack ? 2 : 0);\n\n const height = subGroupScale?.bandwidth() ?? 0;\n const transformX = sequence0 + (!isFloorStack ? 2 : 0);\n const transformY =\n (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0) +\n (yScale?.get(yValue as never) ?? 0);\n return (\n <g key={serie.data[i]?.key} clipPath={`url(#rect-focus-ring-${chartId})`}>\n <g fill={colorScale(serie.name) as string} transform={`translate(0, ${transformY})`}>\n <Rect\n width={width}\n height={height}\n x={transformX}\n xValue={xValue}\n yValue={yValue}\n id={serie.data[i]?.key}\n name={serie.name}\n datum={serie.data[i]}\n />\n </g>\n </g>\n );\n })}\n </g>\n ),\n [\n chartId,\n colorScale,\n getXScaleValue,\n getYValue,\n serie.data,\n serie.name,\n serieWithStackedValues,\n stackIndex,\n subGroupScale,\n yScale,\n ],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC2CP;AAzChB,SAAgB,YAAY,eAAe;AAC3C,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB,uBAAuB;AAGzC,MAAM,wBAAwB,CAAC,EAAE,MAAM,MAAgC;AAC5E,QAAM;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,YAAY;AAC3B,QAAM,yBAAyB,eAAe,aAAa,KAAK;AAChE,QAAM,aAAa,gBAAgB,QAAQ,MAAM,IAAI;AAErD,SAAO;AAAA,IACL,MACE,oBAAC,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ts/build/transpile/react-shim.js", "../../../../../src/graphs/Chart/series/StackedBar.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const StackedBar: React.ComponentType<DSChartT.SerieComponentT> = ({ serie }) => {\n const {\n props: { groups },\n xScale,\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXValue,\n getXScaleValue,\n } = useContext(ChartContext);\n\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n return (\n <g clipPath={`url(#rect-focus-ring-${chartId})`}>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n\n const isFloorStack = sequence[0] === 0;\n\n const xValue = getXValue(bar) as number;\n const xScaleValue = getXScaleValue(bar) ?? 0;\n const yValue = sequence[1] - sequence[0];\n const width = subGroupScale?.bandwidth() ?? 0;\n const height =\n (yScale?.get(sequence[0] as never) ?? 0) - (yScale?.get(sequence[1] as never) ?? 0) - (!isFloorStack ? 1 : 0);\n const transformY = (yScale?.get(sequence[1] as never) ?? 0) + (sequence[0] < 0 ? 2 : 0);\n\n const transformX =\n xScale?.type !== 'BAND'\n ? xScaleValue - width / 2\n : xScaleValue + (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0);\n return (\n <g key={serie.data[i].key} fill={colorScale(serie.name) as string} transform={`translate(${transformX},0)`}>\n <Rect\n width={width}\n height={height}\n xValue={xValue}\n yValue={yValue}\n y={transformY}\n id={serie.data[i].key}\n name={serie.name}\n datum={bar}\n />\n </g>\n );\n })}\n </g>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* prettier-ignore */\nimport React, { useContext } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const StackedBar: React.ComponentType<DSChartT.SerieComponentT> = ({ serie }) => {\n const {\n props: { groups },\n xScale,\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXValue,\n getXScaleValue,\n } = useContext(ChartContext);\n\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n return (\n <g clipPath={`url(#rect-focus-ring-${chartId})`}>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n\n const isFloorStack = sequence[0] === 0;\n\n const xValue = getXValue(bar) as number;\n const xScaleValue = getXScaleValue(bar) ?? 0;\n const yValue = sequence[1] - sequence[0];\n const width = subGroupScale?.bandwidth() ?? 0;\n const height =\n (yScale?.get(sequence[0] as never) ?? 0) - (yScale?.get(sequence[1] as never) ?? 0) - (!isFloorStack ? 1 : 0);\n const transformY = (yScale?.get(sequence[1] as never) ?? 0) + (sequence[0] < 0 ? 2 : 0);\n\n const transformX =\n xScale?.type !== 'BAND'\n ? xScaleValue - width / 2\n : xScaleValue + (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0);\n return (\n <g key={serie.data[i].key} fill={colorScale(serie.name) as string} transform={`translate(${transformX},0)`}>\n <Rect\n width={width}\n height={height}\n xValue={xValue}\n yValue={yValue}\n y={transformY}\n id={serie.data[i].key}\n name={serie.name}\n datum={bar}\n />\n </g>\n );\n })}\n </g>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4CX;AA1CZ,SAAgB,kBAAkB;AAClC,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,gBAAg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T,KAVM,MAAM,KAAK,CAAC,EAAE,GAWtB;AAAA,EAEJ,CAAC,GACH;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-dataviz",
|
|
3
|
-
"version": "3.51.0-rc.
|
|
3
|
+
"version": "3.51.0-rc.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - DataViz",
|
|
6
6
|
"files": [
|
|
@@ -42,21 +42,21 @@
|
|
|
42
42
|
"d3-time": "~3.1.0",
|
|
43
43
|
"resize-observer-polyfill": "~1.5.1",
|
|
44
44
|
"uid": "~2.0.2",
|
|
45
|
-
"@elliemae/ds-
|
|
46
|
-
"@elliemae/ds-
|
|
47
|
-
"@elliemae/ds-
|
|
48
|
-
"@elliemae/ds-
|
|
45
|
+
"@elliemae/ds-grid": "3.51.0-rc.20",
|
|
46
|
+
"@elliemae/ds-popperjs": "3.51.0-rc.20",
|
|
47
|
+
"@elliemae/ds-system": "3.51.0-rc.20",
|
|
48
|
+
"@elliemae/ds-props-helpers": "3.51.0-rc.20"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@elliemae/pui-cli": "9.0.0-next.55",
|
|
52
|
-
"@elliemae/pui-theme": "~2.
|
|
52
|
+
"@elliemae/pui-theme": "~2.11.0",
|
|
53
53
|
"@types/d3": "~7.4.0",
|
|
54
54
|
"jest": "~29.7.0",
|
|
55
55
|
"styled-components": "~5.3.9",
|
|
56
|
-
"@elliemae/ds-monorepo-devops": "3.51.0-rc.
|
|
56
|
+
"@elliemae/ds-monorepo-devops": "3.51.0-rc.20"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@elliemae/pui-theme": "~2.
|
|
59
|
+
"@elliemae/pui-theme": "~2.11.0",
|
|
60
60
|
"lodash": "^4.17.21",
|
|
61
61
|
"react": "^18.3.1",
|
|
62
62
|
"react-dom": "^18.3.1",
|