We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 627b457 commit 883b704Copy full SHA for 883b704
src/plugins/vis_type_timeseries/public/application/visualizations/views/top_n.js
@@ -110,7 +110,9 @@ export class TopN extends Component {
110
const isPositiveValue = lastValue >= 0;
111
112
const intervalLength = TopN.calcDomain(renderMode, min, max);
113
- const width = 100 * (Math.abs(lastValue) / intervalLength);
+ // if both are 0, the division returns NaN causing unexpected behavior.
114
+ // For this it defaults to 0
115
+ const width = 100 * (Math.abs(lastValue) / intervalLength) || 0;
116
117
const styles = reactcss(
118
{
0 commit comments