fix: handle the broken state

This commit is contained in:
Palash gupta 2022-05-22 20:59:35 +05:30
parent 8ec9cb2222
commit 4a287fd112
No known key found for this signature in database
GPG Key ID: 8FD05AE6F9150AD6

View File

@ -20,8 +20,8 @@ export const getDimensions = (num, highest) => {
export const getGraphData = (serviceMap): graphDataType => {
const { items, services } = serviceMap;
const highestCallCount = maxBy(items, (e) => e.callCount).callCount;
const highestCallRate = maxBy(services, (e) => e.callRate).callRate;
const highestCallCount = maxBy(items, (e) => e?.callCount)?.callCount;
const highestCallRate = maxBy(services, (e) => e?.callRate)?.callRate;
const divNum = Number(
String(1).padEnd(highestCallCount.toString().length, '0'),
);