btlqql commented on code in PR #4358:
URL:
https://github.com/apache/rocketmq-dashboard/pull/4358#discussion_r4022823579
##########
web/src/components/MetricsExplorer.tsx:
##########
@@ -122,14 +122,15 @@ const MetricChart = ({
hiddenSeriesText,
}: MetricChartProps) => {
const allSeries = data.series
- .map((series, index) => {
- const { samples, fromHistogram } = toMetricSeriesSamples(series);
- return {
+ .flatMap((series, index) => {
+ const { samples } = toMetricSeriesSamples(series);
+ // Keep raw floats and histogram-derived trends on separate lines.
+ return (['scalar', 'histogram'] as const).map((kind) => ({
color: SERIES_COLORS[index % SERIES_COLORS.length],
label: metricSeriesLabel(series, metric.name),
- samples,
- fromHistogram,
- };
+ samples: samples.filter((sample) => sample.kind === kind),
Review Comment:
Addressed in a688f1c5. Mixed series now use distinct colors and explicit
`(scalar)` / localized histogram suffixes, while single-kind series retain
their existing labels. The component regression verifies both legend labels; 33
targeted tests and ESLint pass.
--
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]