pawarprasad123 commented on code in PR #703:
URL: https://github.com/apache/atlas/pull/703#discussion_r3868980089
##########
dashboard/src/styles/stats.scss:
##########
@@ -60,3 +60,202 @@
.classification-name-cell {
max-width: 400px;
}
+
+.chart-cursor-pointer {
+ cursor: pointer;
+}
+
+.chart-cursor-default {
+ cursor: default;
+}
+
+.chart-label-list {
+ font-size: 12px;
+ font-weight: 500;
+ fill: #1976d2;
+}
+
+.chart-label-list-sm {
+ font-size: 11px;
+ font-weight: 600;
+ fill: #374151;
+}
+
+.legend-button {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 4px;
+ background: none;
+ padding: 0;
+ margin: 0;
+ border-radius: 4px;
+}
+
+.legend-color-box {
+ width: 12px;
+ height: 12px;
+ border-radius: 2px;
+}
+
+.legend-typography {
+ font-size: 0.875rem;
+}
+
+.legend-inactive {
+ color: #868e96;
+}
+
+.legend-active {
+ // Color inherits from Typography (text.primary)
Review Comment:
.legend-active is empty — remove or document why it exists.
##########
dashboard/src/views/DashboardOverview/EntityStatusDonut.tsx:
##########
@@ -150,15 +121,18 @@ const EntityStatusDonut = memo(({ entity, isLoading }:
EntityStatusDonutProps) =
activeIndex={activeIndex}
activeShape={renderActiveShape}
onMouseEnter={(_,
index) => setActiveIndex(index)}
- onMouseLeave={() =>
setActiveIndex(-1)}
- onClick={(data) =>
handleStatusClick(data.name as "Active" | "Shell" | "Deleted")}
+ onMouseLeave={() =>
setActiveIndex(undefined)}
+ onClick={(data:
unknown) => {
+ const d = data
as { name?: string } | undefined | null;
+
handleStatusClick(d?.name as "Active" | "Shell" | "Deleted");
+ }}
>
{chartData.map((entry,
index) => (
<Cell
key={`cell-${index}`} fill={entry.color} stroke="none" />
))}
</Pie>
<Tooltip
- formatter={(value:
number) => numberFormatWithComma(value)}
+ formatter={(value:
unknown) => numberFormatWithComma(Number(value || 0))}
contentStyle={{
borderRadius: 8 }}
Review Comment:
contentStyle on Tooltip conflicts with the “no CSS-in-JS” goal; move to SCSS.
verify and update
##########
dashboard/src/views/DashboardOverview/MessageConsumptionChart.tsx:
##########
@@ -234,12 +234,8 @@ const MessageConsumptionChart = memo(
dataKey="count"
position="top"
offset={8}
- formatter={(v:
number) => numberFormatWithComma(v)}
- style={{
-
fontSize: 11,
-
fontWeight: 600,
- fill:
"#374151",
- }}
+ formatter={(v:
unknown) => numberFormatWithComma(Number(v))}
Review Comment:
Add/update tests for the new LabelList formatter signature.
##########
dashboard/src/views/DashboardOverview/ClassificationDistributionCard.tsx:
##########
@@ -50,6 +50,12 @@ interface ClassificationDistributionCardProps {
isLoading?: boolean;
}
+interface RechartsEventPayload {
Review Comment:
Consider extracting shared RechartsEventPayload / bar payload helper used by
EntityTypeBarChart.
##########
dashboard/src/views/DashboardOverview/EntityStatusDonut.tsx:
##########
@@ -150,15 +121,18 @@ const EntityStatusDonut = memo(({ entity, isLoading }:
EntityStatusDonutProps) =
activeIndex={activeIndex}
Review Comment:
Blocker:
line 121-124
activeIndex was removed in Recharts v3 — npm run typecheck fails here.
Migrate to the v3 shape API or Tooltip-based highlighting. PR text says this
was removed, but it is still present.
line 125-127
Guard name before calling handleStatusClick instead of casting d?.name as
"Active" | "Shell" | "Deleted". Invalid payloads should no-op explicitly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]