From 48a2b67f423b7ad92931f152c6dda9ce728a163e Mon Sep 17 00:00:00 2001 From: Ilfat Galiev Date: Tue, 19 Jun 2018 17:48:27 +0300 Subject: [PATCH] Fix displaying of numbers in tooltip (#34) --- CHANGELOG.md | 3 +++ package.json | 2 +- pbiviz.json | 2 +- src/tooltipsFactory.ts | 3 +-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef1d0a8..8477e44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.8.1 +* Fix displaying of numbers in tooltip + ## 1.8.0 * Added restriction for animation and dragging because of performance issue (limit is 200 nodes) diff --git a/package.json b/package.json index d3d11b6..5bb8257 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "powerbi-visuals-forcegraph", - "version": "1.8.0", + "version": "1.8.1", "description": "This custom visual implements a D3 force layout diagram with curved path. The thickness of the path also represents the weight of the relationship between the nodes.", "repository": { "type": "git", diff --git a/pbiviz.json b/pbiviz.json index a35cbbd..3b4a4a8 100644 --- a/pbiviz.json +++ b/pbiviz.json @@ -4,7 +4,7 @@ "displayName": "Force-Directed Graph", "guid": "ForceGraph1449359463895", "visualClassName": "ForceGraph", - "version": "1.8.0", + "version": "1.8.1", "description": "This custom visual implements a D3 force layout diagram with curved path. The thickness of the path also represents the weight of the relationship between the nodes.", "supportUrl": "http://community.powerbi.com", "gitHubUrl": "https://github.com/Microsoft/PowerBI-visuals-ForceGraph" diff --git a/src/tooltipsFactory.ts b/src/tooltipsFactory.ts index 1fd8490..5ba05f6 100644 --- a/src/tooltipsFactory.ts +++ b/src/tooltipsFactory.ts @@ -62,14 +62,13 @@ module powerbi.extensibility.visual { } value = inputObject[propertyName]; - if (!(typeof value === "number")) { value = valueFormatter.format(value, valueFormatter.getFormatStringByColumn(column)); } tooltips.push({ displayName: column.displayName, - value: value + value: `${value}` }); }