Skip to content

Commit

Permalink
Merge pull request #15 from optimyze/jbcrail/topn-hosts-stacked-bar-c…
Browse files Browse the repository at this point in the history
…hart

Fix empty stacked bar chart for topN hosts
  • Loading branch information
rockdaboot authored Feb 14, 2022
2 parents a3f9381 + 7c51952 commit ad9e293
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/plugins/profiling/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ export function getTopN(obj) {
const bucket = obj.topN.histogram.buckets[i];
for (let j = 0; j < bucket.group_by.buckets.length; j++) {
const v = bucket.group_by.buckets[j];
if (typeof v.key === 'string') {
data.push({ x: bucket.key, y: v.Count.value, g: v.key });
} else {
data.push({ x: bucket.key, y: v.Count.value, g: v.key_as_string });
}
data.push({ x: bucket.key, y: v.Count.value, g: v.key });
}
}
} else if (obj.TopN !== undefined) {
Expand Down

0 comments on commit ad9e293

Please sign in to comment.