@axdspub/axiom-charts 0.0.36 → 0.0.38
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.
|
@@ -1697,7 +1697,7 @@ class AxiomRadialRose extends AxiomPlotRoot {
|
|
|
1697
1697
|
this.numBins = 16;
|
|
1698
1698
|
this.speedBins = d3.range(1, 8, 1);
|
|
1699
1699
|
this.stacks = undefined;
|
|
1700
|
-
this.directionMode = '
|
|
1700
|
+
this.directionMode = 'to';
|
|
1701
1701
|
}
|
|
1702
1702
|
setStackedData() {
|
|
1703
1703
|
var _a, _b, _c;
|
|
@@ -1797,14 +1797,12 @@ class AxiomRadialRose extends AxiomPlotRoot {
|
|
|
1797
1797
|
const chartOffset = chart.getChartOffset();
|
|
1798
1798
|
const bandwidth = 2 * Math.PI / this.numBins;
|
|
1799
1799
|
const getStartAngle = (direction) => {
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
return this.directionMode === 'from' ? start : (start + 180) % 360;
|
|
1800
|
+
const start = this.directionMode === 'from' ? xScale(direction) : xScale((direction + 180) % 360);
|
|
1801
|
+
return (start !== null && start !== void 0 ? start : 0) - (bandwidth / 2);
|
|
1803
1802
|
};
|
|
1804
1803
|
const getEndAngle = (direction) => {
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
return this.directionMode === 'from' ? start : (start + 180) % 360;
|
|
1804
|
+
const end = this.directionMode === 'from' ? xScale(direction) : xScale((direction + 180) % 360);
|
|
1805
|
+
return (end !== null && end !== void 0 ? end : 0) + (bandwidth / 2);
|
|
1808
1806
|
};
|
|
1809
1807
|
svg.insert('g', 'g.axis')
|
|
1810
1808
|
.attr('transform', `translate(${chartOffset.x},${chartOffset.y})`)
|