<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Value Formatter Causing Custom Visual To Disappear in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/495774#M15166</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/37470"&gt;@jigr69&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like some of required dependencies are not included into your custom visual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you include all &lt;A href="https://github.com/Microsoft/powerbi-visuals-utils-formattingutils/blob/master/docs/usage/installation-guide.md#including-javascript-artifacts-to-the-custom-visual" target="_self"&gt;required JS files&lt;/A&gt; into externalJS property?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, please share whole source code for investigation (you can share it here or via email "&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Aug 2018 06:52:28 GMT</pubDate>
    <dc:creator>v-viig</dc:creator>
    <dc:date>2018-08-22T06:52:28Z</dc:date>
    <item>
      <title>Value Formatter Causing Custom Visual To Disappear</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/495237#M15160</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After banging my head on a brick wall for many an hour now, I cannot get the final piece of a custom visual working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to format a value, which is coming through as a measure, into the same format as described by Power BI, in this case, a precentage number to 1 decimal place. Here is a simplified version of my code, I've removed all drawing commands etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Visual.ts&lt;/P&gt;&lt;PRE&gt;enter code module powerbi.extensibility.visual {

"use strict";

import ValueFormatter = powerbi.extensibility.utils.formatting.valueFormatter;
import IValueFormatter = powerbi.extensibility.utils.formatting.IValueFormatter;

export class Visual implements IVisual {

    private host: IVisualHost;
    private svg: d3.Selection&amp;lt;SVGElement&amp;gt;;
    private container: d3.Selection&amp;lt;SVGElement&amp;gt;;
    private textValue: d3.Selection&amp;lt;SVGElement&amp;gt;;

    private visualSettings: VisualSettings;

    constructor(options: VisualConstructorOptions) {

        this.svg = d3.select(options.element)
            .append('svg')
            .classed('circleCard', true);

        this.container = this.svg.append("g")
            .classed('container', true);

        this.textValue = this.container.append("text")
            .classed("textValue", true);
    }

    public update(options: VisualUpdateOptions) {

        let dataView: DataView = options.dataViews[0];

        this.visualSettings = VisualSettings.parse&amp;lt;VisualSettings&amp;gt;(dataView);

        // Grab the width and height of the element.
        let width: number = options.viewport.width;
        let height: number = options.viewport.height;

        // Set the width and height of element to the SVG viewport.
        this.svg.attr({
            width: width,
            height: height
        });

        // Height, width and radius of the gauge
        let tWidth: number = width / 2;
        let tHeight: number = height - 1;
        let radius: number = height;

        // Make sure the gauge fits within the view.
        if (radius &amp;gt; (width / 2))
            radius = tWidth;

        // Define the inner and outer radius of the gauge.
        let oRadius: number = radius;
        let iRadius: number = radius / 1.5;

        // Trying to format the number! :(
        let valueFormatter: IValueFormatter = ValueFormatter.create({
            format: "0.00"
        });

        // Commenting out this line makes it work!
        console.log(valueFormatter.format(123));

        // Display the value used for the arc calculation.
        this.textValue
            .text("69.8%")
            .attr({
                x: '50%',
                y: tHeight - (iRadius / 3),
                dy: '0.35em', 'text-anchor': 'middle'
            }).style({
                'font-size': (iRadius / 30) + 'em',
                'font-family': 'Arial',
                'fill': '#ffffff'
            });

    }

    private static parseSettings(dataView: DataView): VisualSettings {
        return VisualSettings.parse(dataView) as VisualSettings;
    }

    /** 
     * This function gets called for each of the objects defined in the capabilities files and allows you to select which of the 
     * objects and properties you want to expose to the users in the property pane.
     * 
     */
    public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration {
        const settings: VisualSettings = this.visualSettings || VisualSettings.getDefault() as VisualSettings;
        return VisualSettings.enumerateObjectInstances(settings, options);
    }
}
}&lt;/PRE&gt;&lt;P&gt;If I comment out the console.log line, the visual displays the text, if I uncomment the console.log line, the text in the visual disappears. I do not get any warnings from PBIVIZ, therefore it is compiling okay. I'm sure there is an error occuring but what and how/where to find the error, I've no idea (new to this custom visual lark).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be gratefully appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 15:41:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/495237#M15160</guid>
      <dc:creator>jigr69</dc:creator>
      <dc:date>2018-08-21T15:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Value Formatter Causing Custom Visual To Disappear</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/495774#M15166</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/37470"&gt;@jigr69&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like some of required dependencies are not included into your custom visual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you include all &lt;A href="https://github.com/Microsoft/powerbi-visuals-utils-formattingutils/blob/master/docs/usage/installation-guide.md#including-javascript-artifacts-to-the-custom-visual" target="_self"&gt;required JS files&lt;/A&gt; into externalJS property?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, please share whole source code for investigation (you can share it here or via email "&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 06:52:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/495774#M15166</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-08-22T06:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Value Formatter Causing Custom Visual To Disappear</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/495845#M15170</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have sent you an email with the complete package in a zip file, such that the issue can be looked into. My externalJS property of "pbiviz.json" looks as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  "externalJS": [
    "node_modules/powerbi-visuals-utils-typeutils/lib/index.js",
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.js",
    "node_modules/powerbi-visuals-utils-formattingutils/lib/index.js",
    "node_modules/d3/d3.min.js"
  ],&lt;/PRE&gt;&lt;P&gt;The "package.json" file looks as below:&lt;/P&gt;&lt;PRE&gt;{
  "name": "visual",
  "dependencies": {
    "@types/d3": "^3.5.41",
    "d3": "^3.5.5",
    "powerbi-visuals-utils-dataviewutils": "1.2.0",
    "powerbi-visuals-utils-formattingutils": "^3.0.2"
  }
}&lt;/PRE&gt;&lt;P&gt;The "tsconfig.json" file:&lt;/P&gt;&lt;PRE&gt;{
  "compilerOptions": {
    "allowJs": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "ES5",
    "sourceMap": true,
    "out": "./.tmp/build/visual.js"
  },
  "files": [
    ".api/v1.13.0/PowerBI-visuals.d.ts",
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.d.ts",
    "node_modules/powerbi-visuals-utils-formattingutils/lib/index.d.ts",
    "src/settings.ts",
    "src/visual.ts"
  ]
}&lt;/PRE&gt;&lt;P&gt;I have put these in such that anyone else coming across this problem can check their files etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 07:58:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/495845#M15170</guid>
      <dc:creator>jigr69</dc:creator>
      <dc:date>2018-08-22T07:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Value Formatter Causing Custom Visual To Disappear</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/498121#M15279</link>
      <description>&lt;P&gt;I'll have a look today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 07:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/498121#M15279</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-08-24T07:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Value Formatter Causing Custom Visual To Disappear</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/572139#M17704</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that I am trying to raise a dead post, but this is important as I am unable to find any solution for this.&lt;/P&gt;&lt;P&gt;Did you ever resolve this concern ? I am also stuck at the same point.&lt;/P&gt;&lt;P&gt;Any help will be much appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 10:53:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/572139#M17704</guid>
      <dc:creator>rafikhan74</dc:creator>
      <dc:date>2018-11-24T10:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Value Formatter Causing Custom Visual To Disappear</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/573324#M17722</link>
      <description>&lt;P&gt;Please make sure you did all of steps listed in &lt;A href="https://github.com/Microsoft/powerbi-visuals-utils-formattingutils/blob/master/docs/usage/installation-guide.md" target="_self"&gt;installation guide&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If so,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/94770"&gt;@rafikhan74&lt;/a&gt;&amp;nbsp;can you share your code for investigating?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 07:07:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Value-Formatter-Causing-Custom-Visual-To-Disappear/m-p/573324#M17722</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-11-27T07:07:31Z</dc:date>
    </item>
  </channel>
</rss>

