Browse Source

fix(tb-node/charts): corrected timeseries legend orientation

Fixes an issue in timeseries charts where legend layout direction was inverted:
- top/bottom legends were rendered vertically instead of horizontally
- left/right legends were rendered horizontally instead of vertically

Updates legend orientation logic to align with expected timeseries chart behavior.

Fixes: #11959, #14269
Partial Resolution: #15543
pull/15653/head
Levi 4 weeks ago
parent
commit
11d2d628ad
  1. 2
      ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart-widget.component.ts

2
ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart-widget.component.ts

@ -121,7 +121,7 @@ export class TimeSeriesChartWidgetComponent implements OnInit, OnDestroy, AfterV
}
if (this.showLegend) {
this.horizontalLegendPosition = [LegendPosition.left, LegendPosition.right].includes(this.legendConfig.position);
this.horizontalLegendPosition = [LegendPosition.top, LegendPosition.bottom].includes(this.legendConfig.position);
this.legendClass = `legend-${this.legendConfig.position}`;
this.legendColumnTitleStyle = textStyle(this.settings.legendColumnTitleFont);
this.legendColumnTitleStyle.color = this.settings.legendColumnTitleColor;

Loading…
Cancel
Save