Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Commit

Permalink
check if value is null for utilization graph
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudbehl committed Apr 16, 2019
1 parent b0c6e05 commit fd6b1e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Dashboard/Utilization/UtilizationItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class UtilizationItem extends React.PureComponent {
if (isLoading) {
chart = <LoadingComponent />;
} else if (data) {
const chartData = data.map((val, index) => ({ x: index, y: Number(val.toFixed(1)) }));
const chartData = data.map((val, index) => ({ x: index, y: Number(val && val.toFixed(1)) }));
actual = `${Math.round(data[data.length - 1])} ${unit}`;
chart = (
<Chart
Expand Down

0 comments on commit fd6b1e9

Please sign in to comment.