This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new ffee26fe1e feat: add option to change chart label (#3695)
ffee26fe1e is described below

commit ffee26fe1e779b2a2592a841dad880a39252a661
Author: GauiPower <[email protected]>
AuthorDate: Tue Jul 15 10:31:47 2025 +0200

    feat: add option to change chart label (#3695)
---
 .../gauge/config/gauge-widget-config.component.html       | 15 +++++++++++++++
 .../components/charts/gauge/gauge-renderer.service.ts     |  2 +-
 .../components/charts/gauge/model/gauge-widget.model.ts   |  1 +
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git 
a/ui/src/app/data-explorer-shared/components/charts/gauge/config/gauge-widget-config.component.html
 
b/ui/src/app/data-explorer-shared/components/charts/gauge/config/gauge-widget-config.component.html
index 5a7c10e2ab..2b32612a09 100644
--- 
a/ui/src/app/data-explorer-shared/components/charts/gauge/config/gauge-widget-config.component.html
+++ 
b/ui/src/app/data-explorer-shared/components/charts/gauge/config/gauge-widget-config.component.html
@@ -67,6 +67,21 @@
                     />
                 </mat-form-field>
             </div>
+            <div fxFlex fxLayoutAlign="start center" class="ml-10 mb-10">
+                <small>{{ 'Display Name' | translate }}</small>
+                <span fxFlex></span>
+                <mat-form-field appearance="outline" color="accent" 
fxFlex="60">
+                    <input
+                        matInput
+                        type="text"
+                        [(ngModel)]="
+                            currentlyConfiguredWidget.visualizationConfig
+                                .displayName
+                        "
+                        (ngModelChange)="triggerViewRefresh()"
+                    />
+                </mat-form-field>
+            </div>
         </div>
     </sp-configuration-box>
 </sp-visualization-config-outer>
diff --git 
a/ui/src/app/data-explorer-shared/components/charts/gauge/gauge-renderer.service.ts
 
b/ui/src/app/data-explorer-shared/components/charts/gauge/gauge-renderer.service.ts
index e7e6e9d4af..376bbf2cbf 100644
--- 
a/ui/src/app/data-explorer-shared/components/charts/gauge/gauge-renderer.service.ts
+++ 
b/ui/src/app/data-explorer-shared/components/charts/gauge/gauge-renderer.service.ts
@@ -64,7 +64,7 @@ export class SpGaugeRendererService
             data: [
                 {
                     value: value,
-                    name: fieldName,
+                    name: visConfig.displayName ?? fieldName,
                 },
             ],
         };
diff --git 
a/ui/src/app/data-explorer-shared/components/charts/gauge/model/gauge-widget.model.ts
 
b/ui/src/app/data-explorer-shared/components/charts/gauge/model/gauge-widget.model.ts
index 7961f25b43..06135cc259 100644
--- 
a/ui/src/app/data-explorer-shared/components/charts/gauge/model/gauge-widget.model.ts
+++ 
b/ui/src/app/data-explorer-shared/components/charts/gauge/model/gauge-widget.model.ts
@@ -27,6 +27,7 @@ export interface GaugeVisConfig extends DataExplorerVisConfig 
{
     selectedProperty: DataExplorerField;
     min: number;
     max: number;
+    displayName: string;
 }
 
 export interface GaugeWidgetModel extends DataExplorerWidgetModel {

Reply via email to