Skip to content
Snippets Groups Projects
Commit 580eff07 authored by Illya Klymov's avatar Illya Klymov :rocket:
Browse files

Fix corner case when chart has no data

parent eabebd9a
No related branches found
No related tags found
2 merge requests!158514Fix CodeReviewMetrics worker failure with kwargs,!20627Update d3 node module 4.13 -> 5.12
......@@ -124,9 +124,7 @@ export default {
},
},
mounted() {
if (!this.allValuesEmpty) {
this.draw();
}
this.draw();
},
methods: {
draw() {
......@@ -153,7 +151,7 @@ export default {
this.yScale = d3.scaleLinear().rangeRound([this.vbHeight, 0]);
this.xScale.domain(this.graphData.map(d => d.name));
this.yScale.domain([0, d3.max(this.graphData.map(d => d.value))]);
this.yScale.domain([0, d3.max(this.graphData.map(d => d.value)) || Infinity]);
// Zoom/Panning Function
this.zoom = d3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment