abstract-chart 8.1.8 → 8.1.9

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/lib/chart.js CHANGED
@@ -599,12 +599,12 @@ function generateBars(xMin, xMax, yMin, yMax, chart) {
599
599
  const [tl, middle, br] = bars.direction === "x"
600
600
  ? [
601
601
  AI.createPoint((_g = b.min) !== null && _g !== void 0 ? _g : xMinValue, barPos + bars.width / 2),
602
- AI.createPoint((b.max - ((_h = b.min) !== null && _h !== void 0 ? _h : xMinValue)) / 2, barPos),
602
+ AI.createPoint((b.max + ((_h = b.min) !== null && _h !== void 0 ? _h : xMinValue)) / 2, barPos),
603
603
  AI.createPoint(b.max, barPos - bars.width / 2),
604
604
  ]
605
605
  : [
606
606
  AI.createPoint(barPos - bars.width / 2, b.max),
607
- AI.createPoint(barPos, (b.max - ((_j = b.min) !== null && _j !== void 0 ? _j : yMinValue)) / 2),
607
+ AI.createPoint(barPos, (b.max + ((_j = b.min) !== null && _j !== void 0 ? _j : yMinValue)) / 2),
608
608
  AI.createPoint(barPos + bars.width / 2, (_k = b.min) !== null && _k !== void 0 ? _k : yMinValue),
609
609
  ];
610
610
  const pos = Axis.transformPoint(middle, xMin, xMax, yMin, yMax, xAxis, yAxis);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abstract-chart",
3
- "version": "8.1.8",
3
+ "version": "8.1.9",
4
4
  "description": "Drawing charts using multiple unit of measure axes as coordinate system",
5
5
  "repository": "https://github.com/dividab/abstract-visuals/tree/master/packages/abstract-chart",
6
6
  "main": "lib/index.js",
@@ -18,5 +18,5 @@
18
18
  "abstract-image": "^8.2.1",
19
19
  "ts-exhaustive-check": "^1.0.0"
20
20
  },
21
- "gitHead": "3f7535770dab87c2676a45f1ab68d94844096890"
21
+ "gitHead": "f5529f2a5e51403dc3c27b05abbed55cc1f705f6"
22
22
  }
package/src/chart.ts CHANGED
@@ -1082,12 +1082,12 @@ export function generateBars(xMin: number, xMax: number, yMin: number, yMax: num
1082
1082
  bars.direction === "x"
1083
1083
  ? [
1084
1084
  AI.createPoint(b.min ?? xMinValue, barPos + bars.width / 2),
1085
- AI.createPoint((b.max - (b.min ?? xMinValue)) / 2, barPos),
1085
+ AI.createPoint((b.max + (b.min ?? xMinValue)) / 2, barPos),
1086
1086
  AI.createPoint(b.max, barPos - bars.width / 2),
1087
1087
  ]
1088
1088
  : [
1089
1089
  AI.createPoint(barPos - bars.width / 2, b.max),
1090
- AI.createPoint(barPos, (b.max - (b.min ?? yMinValue)) / 2),
1090
+ AI.createPoint(barPos, (b.max + (b.min ?? yMinValue)) / 2),
1091
1091
  AI.createPoint(barPos + bars.width / 2, b.min ?? yMinValue),
1092
1092
  ];
1093
1093
  const pos = Axis.transformPoint(middle, xMin, xMax, yMin, yMax, xAxis, yAxis);