@tetacom/svg-charts 1.2.8 → 1.2.11
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/chart/model/i-chart-config.d.ts +1 -0
- package/esm2020/chart/chart-container/chart-container.component.mjs +3 -3
- package/esm2020/chart/core/axis/builders/axis-size-builder.mjs +2 -2
- package/esm2020/chart/directives/zoomable.directive.mjs +6 -3
- package/esm2020/chart/model/i-chart-config.mjs +1 -1
- package/fesm2015/tetacom-svg-charts.mjs +20 -17
- package/fesm2015/tetacom-svg-charts.mjs.map +1 -1
- package/fesm2020/tetacom-svg-charts.mjs +8 -5
- package/fesm2020/tetacom-svg-charts.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -459,7 +459,7 @@ class AxisSizeBuilder {
|
|
|
459
459
|
build(settings) {
|
|
460
460
|
let finalPadding = this.basePadding;
|
|
461
461
|
if (settings.orientation === AxisOrientation.y) {
|
|
462
|
-
const formatter = settings.defaultFormatter();
|
|
462
|
+
const formatter = settings.options.tickFormat || settings.defaultFormatter();
|
|
463
463
|
finalPadding += settings.options.title ? this.titlePadding : 0;
|
|
464
464
|
const scale = settings.defaultScale();
|
|
465
465
|
const ticks = scale().domain(settings.extremes).ticks(20);
|
|
@@ -2004,6 +2004,9 @@ class ZoomableDirective {
|
|
|
2004
2004
|
[this.size.width, this.size.height],
|
|
2005
2005
|
]);
|
|
2006
2006
|
}
|
|
2007
|
+
if (this.config.zoom?.wheelDelta) {
|
|
2008
|
+
this.zoom.wheelDelta(this.config.zoom?.wheelDelta);
|
|
2009
|
+
}
|
|
2007
2010
|
this.zoomService.axisHashMap.set(this.hash, this.axis);
|
|
2008
2011
|
this.zoomService.elementHashMap.set(this.hash, this._element);
|
|
2009
2012
|
this.zoomService.scaleHashMap.set(this.hash, this.scale);
|
|
@@ -2048,10 +2051,10 @@ class ZoomableDirective {
|
|
|
2048
2051
|
let transform = zoomIdentity.scale(scale);
|
|
2049
2052
|
if (this.config?.zoom?.type === ZoomType.x) {
|
|
2050
2053
|
if (this.config.xAxis[0]?.inverted) {
|
|
2051
|
-
transform = transform.translate(
|
|
2054
|
+
transform = transform.translate(this.brushScale(-m.message.domain[1]), 0);
|
|
2052
2055
|
}
|
|
2053
2056
|
else {
|
|
2054
|
-
transform = transform.translate(this.brushScale(
|
|
2057
|
+
transform = transform.translate(-this.brushScale(m.message.domain[0]), 0);
|
|
2055
2058
|
}
|
|
2056
2059
|
}
|
|
2057
2060
|
if (this.config?.zoom?.type === ZoomType.y) {
|
|
@@ -2445,9 +2448,9 @@ class ChartContainerComponent {
|
|
|
2445
2448
|
const nonOppositeOffsetY = yAxesArray.filter(nonOppositeFilter(axis));
|
|
2446
2449
|
const oppositeOffsetX = xAxesArray.filter(oppositeFilter(axis));
|
|
2447
2450
|
const nonOppositeOffsetX = xAxesArray.filter(nonOppositeFilter(axis));
|
|
2448
|
-
const oppositeTranslateY = oppositeOffsetY.reduce((acc, curr) => acc + curr.selfSize, config.bounds?.
|
|
2451
|
+
const oppositeTranslateY = oppositeOffsetY.reduce((acc, curr) => acc + curr.selfSize, config.bounds?.right);
|
|
2449
2452
|
const nonOppisteTranslateY = nonOppositeOffsetY.reduce((acc, curr) => acc + curr.selfSize, config.bounds?.left);
|
|
2450
|
-
const oppositeTranslateX = oppositeOffsetX.reduce((acc, curr) => acc + curr.selfSize, config.bounds?.
|
|
2453
|
+
const oppositeTranslateX = oppositeOffsetX.reduce((acc, curr) => acc + curr.selfSize, config.bounds?.top);
|
|
2451
2454
|
const nonOppisteTranslateX = nonOppositeOffsetX.reduce((acc, curr) => acc + curr.selfSize, config.bounds?.bottom);
|
|
2452
2455
|
const left = yAxesArray
|
|
2453
2456
|
.filter((_) => _.options.visible && _.options.opposite !== true)
|