Skip to content

Commit fe0d283

Browse files
authored
Merge pull request #4438 from GordonSmith/GAUGE_COLOR
feat: Add title color pp to gauge
2 parents 9248954 + 433ae4a commit fe0d283

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/chart/src/Gauge.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export class Gauge extends SVGWidget {
290290
;
291291

292292
this._bottomText
293-
.style("fill", this.click !== Gauge.prototype.click ? "blue" : "black")
293+
.style("fill", this.click !== Gauge.prototype.click ? this.titleClickColor() : this.titleColor())
294294
.style("text-decoration", this.click !== Gauge.prototype.click ? "underline" : null)
295295
.text(this.title())
296296
;
@@ -319,6 +319,11 @@ export interface Gauge {
319319
title(_: string): this;
320320
titleDescription(): string;
321321
titleDescription(_: string): this;
322+
titleColor(): string;
323+
titleColor(_: string): this;
324+
titleClickColor(): string;
325+
titleClickColor(_: string): this;
326+
322327
maxDiameter(): number;
323328
maxDiameter(_: number): this;
324329
value(): number;
@@ -346,6 +351,9 @@ export interface Gauge {
346351

347352
Gauge.prototype.publish("title", "", "string", "Title");
348353
Gauge.prototype.publish("titleDescription", "", "string", "Title Description");
354+
Gauge.prototype.publish("titleColor", "black", "html-color", "Color of the title text");
355+
Gauge.prototype.publish("titleClickColor", "blue", "html-color", "Color of the title text when clickable");
356+
349357
Gauge.prototype.publish("maxDiameter", 128, "number", "Max Diameter");
350358
Gauge.prototype.publish("value", 0, "number", "Value");
351359
Gauge.prototype.publish("valueDescription", "", "string", "Value Description");

0 commit comments

Comments
 (0)