@windborne/grapher 1.0.33 → 1.0.35
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/package.json
CHANGED
|
@@ -317,7 +317,12 @@ export default class GraphBodyRenderer extends Eventable {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
if (!bounds) {
|
|
320
|
-
bounds = singleSeries.axis
|
|
320
|
+
bounds = singleSeries.axis?.currentBounds;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (!bounds) {
|
|
324
|
+
console.error('No bounds available for rendering');
|
|
325
|
+
return;
|
|
321
326
|
}
|
|
322
327
|
|
|
323
328
|
const zero = singleSeries.zeroLineY === 'bottom' ?
|
|
@@ -417,7 +422,12 @@ export default class GraphBodyRenderer extends Eventable {
|
|
|
417
422
|
}
|
|
418
423
|
|
|
419
424
|
if (!bounds) {
|
|
420
|
-
bounds = singleSeries.axis
|
|
425
|
+
bounds = singleSeries.axis?.currentBounds;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (!bounds) {
|
|
429
|
+
console.error('No bounds available for shadow rendering');
|
|
430
|
+
return;
|
|
421
431
|
}
|
|
422
432
|
|
|
423
433
|
let zero;
|
|
@@ -527,17 +537,23 @@ export default class GraphBodyRenderer extends Eventable {
|
|
|
527
537
|
|
|
528
538
|
const shouldShowIndividualPoints = typeof singleSeries.showIndividualPoints === 'boolean' ? singleSeries.showIndividualPoints : showIndividualPoints;
|
|
529
539
|
|
|
540
|
+
if (!bounds) {
|
|
541
|
+
bounds = singleSeries.axis?.currentBounds || globalBounds;
|
|
542
|
+
}
|
|
543
|
+
|
|
530
544
|
let zero;
|
|
531
545
|
if (singleSeries.zeroLineY === 'bottom') {
|
|
532
546
|
zero = this._sizing.renderHeight;
|
|
533
|
-
} else if (singleSeries.zeroLineY !== undefined) {
|
|
547
|
+
} else if (singleSeries.zeroLineY !== undefined && bounds) {
|
|
534
548
|
zero = (1.0 - ((singleSeries.zeroLineY) - bounds.minY) / (bounds.maxY - bounds.minY)) * this._sizing.renderHeight;
|
|
535
|
-
} else {
|
|
549
|
+
} else if (bounds) {
|
|
536
550
|
if (bounds.minY <= 0 && bounds.maxY >= 0) {
|
|
537
551
|
zero = (1.0 - (0 - bounds.minY) / (bounds.maxY - bounds.minY)) * this._sizing.renderHeight;
|
|
538
552
|
} else {
|
|
539
553
|
zero = this._sizing.renderHeight;
|
|
540
554
|
}
|
|
555
|
+
} else {
|
|
556
|
+
zero = this._sizing.renderHeight;
|
|
541
557
|
}
|
|
542
558
|
const hasNegatives = !!singleSeries.inDataSpace.find((tuple) => tuple[1] < 0);
|
|
543
559
|
|