<?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: Custom visual with integer static settings object in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-with-integer-static-settings-object/m-p/245064#M7638</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="9690" data-lia-user-login="ChrisWilliams" class="lia-mention lia-mention-user"&gt;ChrisWilliams&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See type numeric in Histogram Chart as an example.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Microsoft/powerbi-visuals-histogram/blob/master/capabilities.json" target="_blank"&gt;https://github.com/Microsoft/powerbi-visuals-histogram/blob/master/capabilities.json&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Sep 2017 10:39:50 GMT</pubDate>
    <dc:creator>v-chuncz-msft</dc:creator>
    <dc:date>2017-09-04T10:39:50Z</dc:date>
    <item>
      <title>Custom visual with integer static settings object</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-with-integer-static-settings-object/m-p/244342#M7620</link>
      <description>&lt;P&gt;I'm creating a custom visual that uses some simple integer static settings objects. &amp;nbsp;However the edit box that allows me to edit the values does not appear. &amp;nbsp;The sample text based property appears with an edit box, but my integer properties have no edit box. &amp;nbsp;I would like my Height and Width settings objects to have editable fields like the General section does, below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;powerbi.extensibility.utils.dataview.DataViewObjectsParser to manage my settings as in the default PbiViz example visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My capabilities.json definition:&lt;/P&gt;&lt;PRE&gt;"objects": {
        "imageOptions": {
            "displayName": "Display options",
          "properties": {
            "height": {
              "displayName": "Height (px)",
              "type": {
                "integer": true
              }
            },
            "width": {
              "displayName": "Width (px)",
              "type": {
                "integer": true
              }
            },
            "propName": {
              "displayName": "Name",
              "type": {
                "text": true
              }
            }
          }
        }
    },&lt;/PRE&gt;&lt;P&gt;Settings.ts file using DataViewObjectsParser:&lt;/P&gt;&lt;PRE&gt;module powerbi.extensibility.visual {
    "use strict";
    import DataViewObjectsParser = powerbi.extensibility.utils.dataview.DataViewObjectsParser;

    export class VisualSettings extends DataViewObjectsParser {
        public imageOptions: imageSettings = new imageSettings();
      }

    export class imageSettings {          
        public height: number = 480;
        public width: number = 640;
        public propName: string = "My name";
     }
}&lt;/PRE&gt;&lt;P&gt;My enumerateObjectInstances uses&amp;nbsp;&lt;SPAN&gt;DataViewObjectsParser:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;        public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
            return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options);
        }&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I looked at the Sample Bar Chart example, which also has an integer static object, but it uses a different approach and sets min and max valid values, which creates a slider selector.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 23:15:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-with-integer-static-settings-object/m-p/244342#M7620</guid>
      <dc:creator>ChrisWilliams</dc:creator>
      <dc:date>2017-09-01T23:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual with integer static settings object</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-with-integer-static-settings-object/m-p/245064#M7638</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="9690" data-lia-user-login="ChrisWilliams" class="lia-mention lia-mention-user"&gt;ChrisWilliams&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See type numeric in Histogram Chart as an example.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Microsoft/powerbi-visuals-histogram/blob/master/capabilities.json" target="_blank"&gt;https://github.com/Microsoft/powerbi-visuals-histogram/blob/master/capabilities.json&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 10:39:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-with-integer-static-settings-object/m-p/245064#M7638</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-09-04T10:39:50Z</dc:date>
    </item>
  </channel>
</rss>

