Brijesh619 commented on code in PR #703:
URL: https://github.com/apache/atlas/pull/703#discussion_r3933009380
##########
dashboard/src/styles/stats.scss:
##########
@@ -60,3 +60,228 @@
.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;
+ background-color: var(--legend-color, #d3d3d3);
+}
+
+.legend-typography {
+ font-size: 0.875rem;
+}
+
+.legend-inactive {
Review Comment:
I've also gone ahead and removed all remaining hardcoded, duplicated colors
from stats.scss that were pointing to the active and deleted statuses (such as
.chart-legend-dot-active, .chart-legend-dot-deleted, and
.entity-type-deleted-text).
These have all been updated to use CSS custom properties
(--legend-dot-color, --entity-deleted-color) which are now being passed
dynamically from the dashboardChartPalette.ts within EntityTypeBarChart.tsx.
All of the feedback is fully addressed, maintaining a single source of truth
for your charting colors. Let me know if there's anything else you need!
##########
dashboard/src/views/DashboardOverview/EntityStatusDonut.tsx:
##########
@@ -147,19 +112,21 @@ const EntityStatusDonut = memo(({ entity, isLoading }:
EntityStatusDonutProps) =
isAnimationActive
animationDuration={800}
animationEasing="ease-out"
-
activeIndex={activeIndex}
-
activeShape={renderActiveShape}
- onMouseEnter={(_,
index) => setActiveIndex(index)}
- onMouseLeave={() =>
setActiveIndex(-1)}
- onClick={(data) =>
handleStatusClick(data.name as "Active" | "Shell" | "Deleted")}
+ onClick={(data:
unknown) => {
+ const payload =
getPayloadFromRechartsEvent<StatusDonutDataItem>(data);
+ const name =
payload?.name ?? (data as { name?: "Active" | "Shell" | "Deleted" })?.name;
Review Comment:
I have removed the fallback type cast from EntityStatusDonut.tsx. Since the
project is using Recharts v3 (which properly wraps the event in a { payload }
object), getPayloadFromRechartsEvent will successfully extract the data item
and the fallback is no longer necessary. This ensures we strictly rely on the
typed helper as intended!
--
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]