|
1217 | 1217 | <g v-if="annotationsY.length && !mutableConfig.isStacked"> |
1218 | 1218 | <g v-for="annotation in annotationsY" :key="annotation.uid"> |
1219 | 1219 | <line |
1220 | | - v-if="annotation.yTop && annotation.show" |
| 1220 | + v-if="annotation.yTop && annotation.show && isFinite(annotation.yTop)" |
1221 | 1221 | :x1="annotation.x1" |
1222 | 1222 | :y1="annotation.yTop" |
1223 | 1223 | :x2="annotation.x2" |
|
1229 | 1229 | :style="{ animation: 'none !important'}" |
1230 | 1230 | /> |
1231 | 1231 | <line |
1232 | | - v-if="annotation.yBottom && annotation.show" |
| 1232 | + v-if="annotation.yBottom && annotation.show && isFinite(annotation.yBottom)" |
1233 | 1233 | :x1="annotation.x1" |
1234 | 1234 | :y1="annotation.yBottom" |
1235 | 1235 | :x2="annotation.x2" |
|
1241 | 1241 | :style="{ animation: 'none !important'}" |
1242 | 1242 | /> |
1243 | 1243 | <rect |
1244 | | - v-if="annotation.hasArea && annotation.show" |
| 1244 | + v-if="annotation.hasArea && annotation.show && isFinite(annotation.yTop) && isFinite(annotation.yBottom)" |
1245 | 1245 | :y="Math.min(annotation.yTop, annotation.yBottom)" |
1246 | 1246 | :x="annotation.x1" |
1247 | 1247 | :width="drawingArea.width" |
|
1250 | 1250 | :style="{ animation: 'none !important' }" |
1251 | 1251 | /> |
1252 | 1252 | <rect |
1253 | | - v-if="annotation.config.label.text && annotation.show" |
| 1253 | + v-if="annotation.config.label.text && annotation.show && isFinite(annotation._box.y)" |
1254 | 1254 | class="vue-ui-xy-annotation-label-box" |
1255 | 1255 | v-bind="annotation._box" |
1256 | 1256 | :style="{ animation: 'none !important', transition: 'none !important'}" |
1257 | 1257 | /> |
1258 | 1258 | <text |
1259 | | - v-if="annotation.config.label.text && annotation.show" |
| 1259 | + v-if="annotation.config.label.text && annotation.show && isFinite(annotation._text.y)" |
1260 | 1260 | :id="annotation.id" |
1261 | 1261 | class="vue-ui-xy-annotation-label" |
1262 | 1262 | :x="annotation._text.x" |
@@ -3547,7 +3547,7 @@ export default { |
3547 | 3547 | }, |
3548 | 3548 | calcRectY(plot) { |
3549 | 3549 | if(plot.value >= 0) return plot.y; |
3550 | | - return this.zero; |
| 3550 | + return [null, undefined, NaN, Infinity, -Infinity].includes(this.zero) ? this.drawingArea.bottom : this.zero; |
3551 | 3551 | }, |
3552 | 3552 | calcIndividualRectY(plot) { |
3553 | 3553 | if(plot.value >= 0) return plot.y; |
|
0 commit comments