This is an automated email from the ASF dual-hosted git repository. mfholz pushed a commit to branch fix-status-heatmap-axis in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 6778d3ee7e96fddc299f538f9741c1775ace3486 Author: Marcelfrueh <[email protected]> AuthorDate: Mon May 5 09:17:06 2025 +0200 fix: axis of status heatmap after resize --- .../status-heatmap-renderer.service.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/ui/src/app/data-explorer-shared/components/charts/status-heatmap/status-heatmap-renderer.service.ts b/ui/src/app/data-explorer-shared/components/charts/status-heatmap/status-heatmap-renderer.service.ts index 73d26543b4..da35dff47f 100644 --- a/ui/src/app/data-explorer-shared/components/charts/status-heatmap/status-heatmap-renderer.service.ts +++ b/ui/src/app/data-explorer-shared/components/charts/status-heatmap/status-heatmap-renderer.service.ts @@ -39,6 +39,7 @@ export class SpStatusHeatmapRendererService extends SpBaseEchartsRenderer<Status widgetConfig: StatusHeatmapWidgetModel, ): void { this.basicOptions(options); + this.addAxisOptions(options); const field = widgetConfig.visualizationConfig.selectedProperty; const sourceIndex = field.sourceIndex; @@ -121,11 +122,12 @@ export class SpStatusHeatmapRendererService extends SpBaseEchartsRenderer<Status pieces: dynamicPieces, orient: 'horizontal', right: '5%', - top: '20', + top: '5%', }; options.legend = { type: 'scroll', + top: '0%', }; options.series = [ @@ -160,16 +162,28 @@ export class SpStatusHeatmapRendererService extends SpBaseEchartsRenderer<Status basicOptions(options: EChartsOption): void { options.grid = { - height: '80%', - top: '80', + containLabel: true, + height: '60%', + top: '20%', + bottom: '10%', }; + } + + private addAxisOptions(options: EChartsOption): void { options.xAxis = { type: 'category', splitArea: { show: true }, + axisLabel: { + overflow: 'truncate', + }, }; + options.yAxis = { type: 'category', splitArea: { show: true }, + axisLabel: { + overflow: 'truncate', + }, }; }
