Skip to content

Commit 525e18e

Browse files
committed
fix copilot comments
1 parent 8845634 commit 525e18e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pbiviz.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"visual": {
33
"name": "dualKpi",
4-
"displayName": "DEBUG_Dual KPI 2.2.0.0",
5-
"guid": "DEBUG_PBI_CV_3C80B1F2_09AF_4123_8E99_C3CBC46B23E0",
4+
"displayName": "Dual KPI 2.2.0.0",
5+
"guid": "PBI_CV_3C80B1F2_09AF_4123_8E99_C3CBC46B23E0",
66
"visualClassName": "DualKpi",
77
"version": "2.2.0.0",
88
"description": "Dual KPI efficiently visualizes two measures over time. It shows their trend based on a joint timeline, while absolute values may use different scales, for example Profit and Market share or Sales and Profit. Each KPI can be visualized as line chart or area chart. The visual has dynamic behavior and can show historical value and the change from the latest value when you hover over it. It also has small icons and labels to convey KPI definitions and alerts about data freshness. Customize colors, titles, axis properties, tooltips, and more, to create visually appealing and functional executive dashboards.",

src/visual.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export class DualKpi implements IVisual {
238238
};
239239

240240
private static INVISIBLE: string = "invisible";
241+
private static readonly TEXT_WIDTH_PADDING_RATIO = 0.9
241242

242243
private static OPACITY_MIN: number = 0;
243244
private static OPACITY_MAX: number = 100;
@@ -1505,7 +1506,7 @@ export class DualKpi implements IVisual {
15051506
text: element.text(),
15061507
fontSize: element.style("font-size"),
15071508
fontFamily: element.style("font-family"),
1508-
}, options.width * 0.9); // allow for some padding
1509+
}, options.width * DualKpi.TEXT_WIDTH_PADDING_RATIO); // allow for some padding
15091510

15101511
element.text(tailoredText);
15111512

0 commit comments

Comments
 (0)