<?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: Max Min Limit setup in custom visual in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3598229#M8522</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/292248"&gt;@ewaghabi&lt;/a&gt;&amp;nbsp;Thanks a lot! The issue was stayed unsolved. Now, it works with the above code.&lt;/P&gt;&lt;P&gt;Thanks Again!&lt;/P&gt;</description>
    <pubDate>Fri, 22 Dec 2023 06:52:22 GMT</pubDate>
    <dc:creator>AakashMarasini</dc:creator>
    <dc:date>2023-12-22T06:52:22Z</dc:date>
    <item>
      <title>Max Min Limit setup in custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3452939#M8029</link>
      <description>&lt;P&gt;Hi Developers!&lt;BR /&gt;&lt;BR /&gt;I am building a custom visual and added the Max Area height for x axis. Now i want to set the min and max value to it. I have tried putting those values in capabilities.json file and in setting.js file but didnot work.&lt;BR /&gt;&lt;BR /&gt;In setting.js file, My code for maxAreaHeight. it shows error while adding max and min to it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;public maxAreaHeightX = new formattingSettings.Slider({
  name: "maxAreaHeightX",
  displayName: "Max Area Height",
  value: 20 
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the object for this in capabilities.json looks like as below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"maxAreaHeightX": {
      "displayName": "Max Area Height",
      "type": {
        "integer": true 
      
      }
      
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AakashMarasini_0-1695969881973.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/974809i59C4F1DC4893E9D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AakashMarasini_0-1695969881973.png" alt="AakashMarasini_0-1695969881973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have set the max and min value of 30 and 10 respectively. But in the formatting slider the value is showing 0 to 100.Also In the slider, i want the value starting from 10 to 30.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let maxAreaHeightPercentageX = this.visualSettings.xAxis.maxAreaHeightX.value ;
maxAreaHeightPercentageX = Math.min(30, Math.max(10, maxAreaHeightPercentageX));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 06:44:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3452939#M8029</guid>
      <dc:creator>AakashMarasini</dc:creator>
      <dc:date>2023-09-29T06:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Max Min Limit setup in custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3587736#M8490</link>
      <description>&lt;P&gt;I don't know if you already got it, but I managed to do it with something like this (in your settings.ts file):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import powerbi from "powerbi-visuals-api";

...
class MyMaxValidator implements powerbi.visuals.MaxValidator&amp;lt;number&amp;gt; {
   type: powerbi.visuals.ValidatorType.Max;
   value: number;

   constructor(max: number) {
       this.value = max;
   }
}
class MyMinValidator implements powerbi.visuals.MinValidator&amp;lt;number&amp;gt; {
   type: powerbi.visuals.ValidatorType.Min;
   value: number;

   constructor(min: number) {
       this.value = min;
   }
}

...

public maxAreaHeightX = new formattingSettings.Slider({
  name: "maxAreaHeightX",
  displayName: "Max Area Height",
  value: 20,
  options: { maxValue: new MyMaxValidator(30), minValue: new MyMinValidator(10) }    
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2023 20:55:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3587736#M8490</guid>
      <dc:creator>ewaghabi</dc:creator>
      <dc:date>2023-12-17T20:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Max Min Limit setup in custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3598229#M8522</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/292248"&gt;@ewaghabi&lt;/a&gt;&amp;nbsp;Thanks a lot! The issue was stayed unsolved. Now, it works with the above code.&lt;/P&gt;&lt;P&gt;Thanks Again!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 06:52:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3598229#M8522</guid>
      <dc:creator>AakashMarasini</dc:creator>
      <dc:date>2023-12-22T06:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Max Min Limit setup in custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3810371#M9410</link>
      <description>&lt;P&gt;Easier way to do this is :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;public maxAreaHeightX = new formattingSettings.Slider({
  name: "maxAreaHeightX",
  displayName: "Max Area Height",
  value: 20,
  options: {
     maxValue: {
        type: powerbi.visuals.ValidatorType.Max,
        value: 30
     },
     minValue: {
        type: powerbi.visuals.ValidatorType.Min,
        value: 10
     }
   }
});&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 04 Apr 2024 10:15:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Max-Min-Limit-setup-in-custom-visual/m-p/3810371#M9410</guid>
      <dc:creator>enfarer</dc:creator>
      <dc:date>2024-04-04T10:15:02Z</dc:date>
    </item>
  </channel>
</rss>

