Skip to content

Commit 7b636c6

Browse files
authored
fix: show overflowed client and versions on insights (#7123)
1 parent 2498407 commit 7b636c6

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.changeset/bright-tires-type.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hive': patch
3+
---
4+
5+
show overflowed client and versions on insights

packages/web/app/src/components/target/insights/Stats.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,11 +716,12 @@ function ClientsStats(props: {
716716
trigger: 'item',
717717
formatter(dataPoint: {
718718
data: {
719+
path: string;
719720
name: string;
720721
value: number;
721722
};
722723
}) {
723-
return `${dataPoint.data.name}: ${formatNumber(dataPoint.data.value)}`;
724+
return `<div>${dataPoint.data.path ?? dataPoint.data.name}</div>Operations: <b>${formatNumber(dataPoint.data.value)}</b>`;
724725
},
725726
},
726727
legend: {
@@ -731,16 +732,29 @@ function ClientsStats(props: {
731732
name: 'All clients and versions',
732733
type: 'treemap',
733734
label: {
735+
position: ['50%', '50%'],
736+
offset: [0, -15],
734737
show: true,
735-
formatter: '{b}',
738+
formatter: '{a|{b}}',
739+
overflow: 'none',
740+
align: 'center',
741+
rich: {
742+
a: {
743+
padding: 4,
744+
height: 15,
745+
backgroundColor: 'rgba(0,0,0,0.7)',
746+
},
747+
},
736748
},
737749
upperLabel: {
738750
show: true,
739751
height: 30,
752+
formatter: '{b}',
740753
color: '#fff',
741754
backgroundColor: 'transparent',
742755
padding: 5,
743756
fontWeight: 'bold',
757+
overflow: 'none',
744758
},
745759
itemStyle: {
746760
borderColor: 'rgba(255, 255, 255, 0.2)',

0 commit comments

Comments
 (0)