diff --git a/dist/playAxis.pbiviz b/dist/playAxis.pbiviz index 8b92c59..1fe5afb 100644 Binary files a/dist/playAxis.pbiviz and b/dist/playAxis.pbiviz differ diff --git a/pbiviz.json b/pbiviz.json index 2790414..acbb115 100644 --- a/pbiviz.json +++ b/pbiviz.json @@ -2,7 +2,7 @@ "visual": { "name": "playAxis", "displayName": "Play Axis", - "guid": "PBI_CV_8CBD39D2_8133_44C9_AE4A_D2A6F37F3719", + "guid": "PBI_CV_16948668_E17D_454B_8664_2F2C470EA8C2", "visualClassName": "Visual", "version": "1.1.0", "description": "Play axis that works like a dynamic slicer, animating other visuals. It has controls like play, pause, stop, previous and next, allowing a report and its visuals to play without user interaction. This visual accepts any parameter to be played and has some settings like colours, font size and transition options, to be customized by the user. This component was developed at Analytics & Data Science Department of São João Hospital (Porto, Portugal).", diff --git a/src/playAxis.ts b/src/playAxis.ts index 196fde6..c08e5b1 100644 --- a/src/playAxis.ts +++ b/src/playAxis.ts @@ -304,18 +304,16 @@ module powerbi.extensibility.visual { let fontSize = viewModel.settings.captionSettings.fontSize; this.svg.select("#label").attr("font-size", fontSize); - let myViewBox = options.viewport; - this.fieldName = options.dataViews[0].categorical.categories[0].source.displayName; - + //Change title if (this.visualSettings.captionSettings.show) { this.updateCaption(this.fieldName); let node: any = this.svg.select("#label").node(); - let TextWidth = node.getBBox(); - - let viewBoxWidth = 155 + TextWidth.width; + let TextBBox = node.getBBox(); + + let viewBoxWidth = 155 + TextBBox.width; this.controlsSVG .attr("viewBox","0 0 " + viewBoxWidth + " 24") .attr('preserveAspectRatio','xMinYMid');