Merge pull request #1189 from palash-signoz/1161-service-map

fix: handle the broken state in service map
This commit is contained in:
palash-signoz 2022-05-24 11:20:50 +05:30 committed by GitHub
commit 3d46abc1e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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'),
);