@swimlane/ngx-charts 20.2.2-beta.4 → 20.3.0
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.
|
@@ -1509,6 +1509,12 @@ class XAxisTicksComponent {
|
|
|
1509
1509
|
this.textAnchor = TextAnchor.Middle;
|
|
1510
1510
|
}
|
|
1511
1511
|
if (this.isWrapTicksSupported) {
|
|
1512
|
+
// for SSR, if there is no angle, calculate height based on number of tick lines
|
|
1513
|
+
if (!isPlatformBrowser(this.platformId) && (angle === 0 || angle === null)) {
|
|
1514
|
+
const longestTick = this.ticks.reduce((savedText, text) => (text.length > savedText.length ? text : savedText), '');
|
|
1515
|
+
const tickLines = this.tickChunks(longestTick);
|
|
1516
|
+
this.approxHeight = 10 * (tickLines.length || 1);
|
|
1517
|
+
}
|
|
1512
1518
|
this.maxPossibleLengthForTick = this.getMaxPossibleLengthForTick(this.ticks);
|
|
1513
1519
|
}
|
|
1514
1520
|
setTimeout(() => this.updateDims());
|