Skip to content

Commit 28a71a1

Browse files
committed
improve some legends placements
1 parent 64db1aa commit 28a71a1

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

web/src/components/KMeansExplorer.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default function KMeansExplorer({
106106

107107
legend: {
108108
type: "scroll",
109-
top: 35,
109+
top: 60,
110110
},
111111

112112
grid: { left: 70, right: 20, top: 90, bottom: 60 },
@@ -178,9 +178,9 @@ export default function KMeansExplorer({
178178
<ReactECharts
179179
option={option || {}}
180180
style={{ height, width: "100%" }}
181-
notMerge={true} // ✅ IMPORTANT: remove old series
181+
notMerge={true}
182182
lazyUpdate={true}
183-
replaceMerge={["series", "legend"]} // ✅ extra safety
183+
replaceMerge={["series", "legend"]}
184184
/>
185185
{(!points || !allLabels) && (
186186
<div

web/src/components/MultiHistFromJson.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default function MultiHistFromJson({
8080
].join("<br/>");
8181
},
8282
},
83-
legend: { top: 40 },
83+
legend: { top: 60 },
8484
xAxis: {
8585
type: logX ? "log" : "value",
8686
name: xName,
@@ -96,7 +96,7 @@ export default function MultiHistFromJson({
9696
axisLabel: { formatter: (v) => Number(v).toLocaleString() },
9797
},
9898
series,
99-
grid: { left: 80, right: 20, bottom: 60, top: 80 },
99+
grid: { left: 80, right: 20, bottom: 60, top: 130 },
100100
};
101101
}, [h, error, title, xName, yName, logX, logY]);
102102

web/src/components/ProfileCards.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,9 @@ function taglineFrom(a) {
5757
}
5858

5959
export default function ProfileCards({
60-
// where your exported JSON lives
6160
basePath = "data/kmeans_explorer",
62-
// new JSON (recommended instead of TSV)
6361
peopleShareJsonPath = "data/kmeans_cluster_people_share.json",
64-
65-
// ✅ fixed K for the “character cards”
6662
Kfixed = 10,
67-
68-
// regime bounds (for bars)
6963
minTc = 10,
7064
maxTc = 1000,
7165
minNch = 1,

0 commit comments

Comments
 (0)