@smallwebco/tinypivot-react 1.0.69 → 1.0.71

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/index.cjs CHANGED
@@ -1571,6 +1571,17 @@ function ChartBuilder({
1571
1571
  showSize: false,
1572
1572
  showSeries: true
1573
1573
  };
1574
+ case "stackedBar":
1575
+ return {
1576
+ xAxis: "X-Axis (dimension)",
1577
+ xAxisPlaceholder: "Drop a dimension",
1578
+ yAxis: "Y-Axis (measure)",
1579
+ yAxisPlaceholder: "Drop a measure",
1580
+ series: "Series (stacking field)",
1581
+ seriesPlaceholder: "Drop a dimension to stack by",
1582
+ showSize: false,
1583
+ showSeries: true
1584
+ };
1574
1585
  default:
1575
1586
  return {
1576
1587
  xAxis: "X-Axis (dimension)",
@@ -1701,6 +1712,7 @@ function ChartBuilder({
1701
1712
  const getApexChartType = (0, import_react4.useCallback)((type) => {
1702
1713
  const mapping = {
1703
1714
  bar: "bar",
1715
+ stackedBar: "bar",
1704
1716
  line: "line",
1705
1717
  area: "area",
1706
1718
  pie: "pie",
@@ -1821,7 +1833,7 @@ function ChartBuilder({
1821
1833
  }
1822
1834
  };
1823
1835
  }
1824
- if (options.stacked && ["bar", "area"].includes(config.type)) {
1836
+ if (config.type === "stackedBar" || options.stacked && ["bar", "area"].includes(config.type)) {
1825
1837
  baseOptions.chart.stacked = true;
1826
1838
  }
1827
1839
  if (config.type === "pie" || config.type === "donut") {
@@ -1943,6 +1955,7 @@ function ChartBuilder({
1943
1955
  const getChartIcon = (0, import_react4.useCallback)((type) => {
1944
1956
  const icons = {
1945
1957
  bar: "M3 3v18h18V3H3zm4 14H5v-6h2v6zm4 0H9V7h2v10zm4 0h-2V9h2v8zm4 0h-2v-4h2v4z",
1958
+ stackedBar: "M3 3v18h18V3H3zm4 14H5v-3h2v3zm0-4H5v-3h2v3zm4 4H9v-5h2v5zm0-6H9v-4h2v4zm4 6h-2v-3h2v3zm0-4h-2v-5h2v5zm4 4h-2v-2h2v2zm0-3h-2v-2h2v2z",
1946
1959
  line: "M3.5 18.5l6-6 4 4 8-8M14.5 8.5h6v6",
1947
1960
  area: "M3 17l6-6 4 4 8-8v10H3z",
1948
1961
  pie: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8v8l5.66 5.66C14.28 19.04 13.18 20 12 20z",