refactor: move legend row outside of the chart container in AnalyticsScreen

This commit is contained in:
Jhony Cesar
2026-07-28 00:19:59 -04:00
parent a8d1ea9f4b
commit dc269dcec2

View File

@@ -324,34 +324,36 @@ fun SCurveCard(analyticsState: AnalyticsState) {
} }
) )
} }
Spacer(modifier = Modifier.height(16.dp)) } // Close Canvas
// Legend Row Spacer(modifier = Modifier.height(16.dp))
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
) {
// Planned Legend
Box(
modifier = Modifier
.size(width = 16.dp, height = 3.dp)
.background(Color.LightGray)
)
Spacer(modifier = Modifier.width(6.dp))
Text(text = "Planejado", fontSize = 12.sp, color = Color.Gray)
Spacer(modifier = Modifier.width(24.dp)) // Legend Row
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
) {
// Planned Legend
Box(
modifier = Modifier
.size(width = 16.dp, height = 3.dp)
.background(Color.LightGray)
)
Spacer(modifier = Modifier.width(6.dp))
Text(text = "Planejado", fontSize = 12.sp, color = Color.Gray)
// Realized Legend Spacer(modifier = Modifier.width(24.dp))
Box(
modifier = Modifier // Realized Legend
.size(width = 16.dp, height = 3.dp) Box(
.background(Color(0xFF4CAF50)) modifier = Modifier
) .size(width = 16.dp, height = 3.dp)
Spacer(modifier = Modifier.width(6.dp)) .background(Color(0xFF4CAF50))
Text(text = "Realizado", fontSize = 12.sp, color = Color.Gray) )
} Spacer(modifier = Modifier.width(6.dp))
Text(text = "Realizado", fontSize = 12.sp, color = Color.Gray)
}
} }
} }
} }