<?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 development in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/custom-visual-development/m-p/4697685#M61247</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/903404"&gt;@animebuff&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Understanding the Imports and What's Needed&lt;/P&gt;
&lt;P&gt;1. What to Import?&lt;/P&gt;
&lt;P&gt;The imports depend on what features your visual needs.&lt;/P&gt;
&lt;P&gt;a. powerbi-visuals-api: Always required. Provides interfaces like IVisual, VisualUpdateOptions, etc.&lt;BR /&gt;b. d3: Only needed if you're using D3 for rendering (as in your example).&lt;BR /&gt;c. ./../style/visual.less: For styling your visual.&lt;/P&gt;
&lt;P&gt;Here’s what you generally need for Power BI visuals:&lt;/P&gt;
&lt;P&gt;import powerbi from "powerbi-visuals-api";&lt;BR /&gt;import IVisual = powerbi.extensibility.visual.IVisual;&lt;BR /&gt;import VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions;&lt;BR /&gt;import VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions;&lt;BR /&gt;import IVisualHost = powerbi.extensibility.IVisualHost;&lt;BR /&gt;These are essential to hook into the Power BI visual lifecycle (constructor, update, etc.).&lt;/P&gt;
&lt;P&gt;2. What’s Available?&lt;/P&gt;
&lt;P&gt;To know what's available: Install the type definitions: npm install powerbi-visuals-api. Use your editor's IntelliSense (VS Code works great). Explore the source/type definitions in node_modules/powerbi-visuals-api/.&lt;/P&gt;
&lt;P&gt;Look into: powerbi.DataView, powerbi.extensibility and powerbi.visuals. These have everything from data shapes to formatting to capabilities.&lt;/P&gt;
&lt;P&gt;3. Third-Party Libraries&lt;/P&gt;
&lt;P&gt;You can use libraries like d3, lodash, or moment, but always check the pbiviz.json config (under externalJS) and package them correctly.&lt;/P&gt;
&lt;P&gt;What Belongs as a Private Class Property?&lt;/P&gt;
&lt;P&gt;Put in private anything that: Represents persistent elements or references (like svg, host, textValue, etc.). Is used across multiple methods in your class. Needs to retain state between updates (like configuration, selections, etc.).&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;private svg: Selection&amp;lt;SVGElement&amp;gt;; // used in constructor &amp;amp; update&lt;/P&gt;
&lt;P&gt;Note: Don’t define as a class property if it’s: Only needed inside one method. Temporary for a calculation (like let radius = ... in update()).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer community threads and Microsoft official documents and articles.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visuals-development-Issue-with-font-quot-DIN/m-p/4410837" target="_blank"&gt;Solved: Power BI Custom Visuals development - Issue with f... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Using-D3-v5-for-developing-custom-visual/m-p/506896" target="_blank"&gt;Solved: Using D3 v5 for developing custom visual - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/developing-Custom-Visual-with-Table-Data-Binding/m-p/74380" target="_blank"&gt;Solved: developing Custom Visual with Table Data Binding - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visuals-Community/m-p/667211" target="_blank"&gt;Power BI Custom Visuals' Community - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/develop-power-bi-visuals" target="_blank"&gt;Develop custom visuals in Power BI - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/environment-setup?tabs=desktop" target="_blank"&gt;Setting up an environment for developing a Power BI visual - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/" target="_blank"&gt;Power BI visuals documentation - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.microsoft.com/en-us/power-platform/products/power-bi/developers/custom-visualization?msockid=2c82ae94ebae62c410d9bb54eafc63ab" target="_blank"&gt;Power BI Custom Visuals – Data Visualization Tools | Power BI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/Custom-Visual-in-Power-BI/ba-p/2814108" target="_blank"&gt;Custom Visual in Power BI - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://answers.microsoft.com/en-us/msoffice/forum/all/power-bi-custom-visual-development-issue/524add1b-572c-4fdc-887a-144acbf93eb9" target="_blank"&gt;Power BI Custom Visual development issue - Microsoft Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If my response has resolved your query, please mark it as the &lt;STRONG&gt;"Accepted Solution"&lt;/STRONG&gt; to assist others. Additionally, a &lt;STRONG&gt;"Kudos"&lt;/STRONG&gt; would be appreciated if you found my response helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 May 2025 05:19:32 GMT</pubDate>
    <dc:creator>v-dineshya</dc:creator>
    <dc:date>2025-05-19T05:19:32Z</dc:date>
    <item>
      <title>custom visual development</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/custom-visual-development/m-p/4697270#M61244</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;"use strict"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; &lt;SPAN class=""&gt;"./../style/visual.less"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; powerbi &lt;/SPAN&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; &lt;SPAN class=""&gt;"powerbi-visuals-api"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions; &lt;/SPAN&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions; &lt;/SPAN&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; IVisual = powerbi.extensibility.visual.IVisual; &lt;/SPAN&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; &lt;SPAN class=""&gt;DataView&lt;/SPAN&gt;&lt;SPAN&gt; = powerbi.DataView; &lt;/SPAN&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; IVisualHost = powerbi.extensibility.IVisualHost; &lt;/SPAN&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN class=""&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; d3 &lt;/SPAN&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; &lt;SPAN class=""&gt;"d3"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;type&lt;/SPAN&gt;&lt;SPAN&gt; Selection&amp;lt;T &lt;/SPAN&gt;&lt;SPAN class=""&gt;extends&lt;/SPAN&gt;&lt;SPAN&gt; d3.BaseType&amp;gt; = d3.Selection&amp;lt;T, &lt;/SPAN&gt;&lt;SPAN class=""&gt;any&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;any&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;any&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;export&lt;/SPAN&gt; &lt;SPAN class=""&gt;class&lt;/SPAN&gt;&lt;SPAN&gt; Visual &lt;/SPAN&gt;&lt;SPAN class=""&gt;implements&lt;/SPAN&gt;&lt;SPAN&gt; IVisual { &lt;/SPAN&gt;&lt;SPAN class=""&gt;private&lt;/SPAN&gt;&lt;SPAN&gt; host: IVisualHost; &lt;/SPAN&gt;&lt;SPAN class=""&gt;private&lt;/SPAN&gt;&lt;SPAN&gt; svg: Selection&amp;lt;SVGElement&amp;gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;private&lt;/SPAN&gt;&lt;SPAN&gt; container: Selection&amp;lt;SVGElement&amp;gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;private&lt;/SPAN&gt;&lt;SPAN&gt; circle: Selection&amp;lt;SVGElement&amp;gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;private&lt;/SPAN&gt;&lt;SPAN&gt; textValue: Selection&amp;lt;SVGElement&amp;gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;private&lt;/SPAN&gt;&lt;SPAN&gt; textLabel: Selection&amp;lt;SVGElement&amp;gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;constructor&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;options: VisualConstructorOptions&lt;/SPAN&gt;&lt;SPAN&gt;) { &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.svg = d3.select(options.element) .append(&lt;/SPAN&gt;&lt;SPAN class=""&gt;'svg'&lt;/SPAN&gt;&lt;SPAN&gt;) .classed(&lt;/SPAN&gt;&lt;SPAN class=""&gt;'circleCard'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.container = &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.svg.append(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"g"&lt;/SPAN&gt;&lt;SPAN&gt;) .classed(&lt;/SPAN&gt;&lt;SPAN class=""&gt;'container'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.circle = &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.container.append(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"circle"&lt;/SPAN&gt;&lt;SPAN&gt;) .classed(&lt;/SPAN&gt;&lt;SPAN class=""&gt;'circle'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.textValue = &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.container.append(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"text"&lt;/SPAN&gt;&lt;SPAN&gt;) .classed(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"textValue"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.textLabel = &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.container.append(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"text"&lt;/SPAN&gt;&lt;SPAN&gt;) .classed(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"textLabel"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;); } &lt;/SPAN&gt;&lt;SPAN class=""&gt;public&lt;/SPAN&gt;&lt;SPAN&gt; update(options: VisualUpdateOptions) { &lt;/SPAN&gt;&lt;SPAN class=""&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; width: &lt;/SPAN&gt;&lt;SPAN class=""&gt;number&lt;/SPAN&gt;&lt;SPAN&gt; = options.viewport.width; &lt;/SPAN&gt;&lt;SPAN class=""&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; height: &lt;/SPAN&gt;&lt;SPAN class=""&gt;number&lt;/SPAN&gt;&lt;SPAN&gt; = options.viewport.height; &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.svg.attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"width"&lt;/SPAN&gt;&lt;SPAN&gt;, width); &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.svg.attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"height"&lt;/SPAN&gt;&lt;SPAN&gt;, height); &lt;/SPAN&gt;&lt;SPAN class=""&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; radius: &lt;/SPAN&gt;&lt;SPAN class=""&gt;number&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN class=""&gt;Math&lt;/SPAN&gt;&lt;SPAN&gt;.min(width, height) / &lt;/SPAN&gt;&lt;SPAN class=""&gt;2.2&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.circle .style(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"fill"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"white"&lt;/SPAN&gt;&lt;SPAN&gt;) .style(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"fill-opacity"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;0.5&lt;/SPAN&gt;&lt;SPAN&gt;) .style(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"stroke"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"black"&lt;/SPAN&gt;&lt;SPAN&gt;) .style(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"stroke-width"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"r"&lt;/SPAN&gt;&lt;SPAN&gt;, radius) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"cx"&lt;/SPAN&gt;&lt;SPAN&gt;, width / &lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"cy"&lt;/SPAN&gt;&lt;SPAN&gt;, height / &lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;SPAN class=""&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; fontSizeValue: &lt;/SPAN&gt;&lt;SPAN class=""&gt;number&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN class=""&gt;Math&lt;/SPAN&gt;&lt;SPAN&gt;.min(width, height) / &lt;/SPAN&gt;&lt;SPAN class=""&gt;5&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.textValue .text(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Value"&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"x"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"50%"&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"y"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"50%"&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"dy"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"0.35em"&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"text-anchor"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"middle"&lt;/SPAN&gt;&lt;SPAN&gt;) .style(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"font-size"&lt;/SPAN&gt;&lt;SPAN&gt;, fontSizeValue + &lt;/SPAN&gt;&lt;SPAN class=""&gt;"px"&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;SPAN class=""&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; fontSizeLabel: &lt;/SPAN&gt;&lt;SPAN class=""&gt;number&lt;/SPAN&gt;&lt;SPAN&gt; = fontSizeValue / &lt;/SPAN&gt;&lt;SPAN class=""&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.textLabel .text(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Label"&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"x"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"50%"&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"y"&lt;/SPAN&gt;&lt;SPAN&gt;, height / &lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"dy"&lt;/SPAN&gt;&lt;SPAN&gt;, fontSizeValue / &lt;/SPAN&gt;&lt;SPAN class=""&gt;1.2&lt;/SPAN&gt;&lt;SPAN&gt;) .attr(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"text-anchor"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"middle"&lt;/SPAN&gt;&lt;SPAN&gt;) .style(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"font-size"&lt;/SPAN&gt;&lt;SPAN&gt;, fontSizeLabel + &lt;/SPAN&gt;&lt;SPAN class=""&gt;"px"&lt;/SPAN&gt;&lt;SPAN&gt;); } }&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;there is no concerete docs for developing visuals.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;we have docs but its more like bits and pieces&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;there are lot of question arises while reading the docs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;we have few imports on the above code, it is said import what's needed but how can we be sure what's the import needed. and what are the imports available?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and what all are should be defined in private class property?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;can some one please explain these and give some solid docs for creating custom visuals&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;any type of advice is also much appreciated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note: I'm willing to learn and spend my time but I don't have a solid base&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;everything I see in docs looks like bits and pieces&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I get answers for some learning them but for some I can't find it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so please help me&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2025 15:56:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/custom-visual-development/m-p/4697270#M61244</guid>
      <dc:creator>animebuff</dc:creator>
      <dc:date>2025-05-18T15:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: custom visual development</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/custom-visual-development/m-p/4697685#M61247</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/903404"&gt;@animebuff&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Understanding the Imports and What's Needed&lt;/P&gt;
&lt;P&gt;1. What to Import?&lt;/P&gt;
&lt;P&gt;The imports depend on what features your visual needs.&lt;/P&gt;
&lt;P&gt;a. powerbi-visuals-api: Always required. Provides interfaces like IVisual, VisualUpdateOptions, etc.&lt;BR /&gt;b. d3: Only needed if you're using D3 for rendering (as in your example).&lt;BR /&gt;c. ./../style/visual.less: For styling your visual.&lt;/P&gt;
&lt;P&gt;Here’s what you generally need for Power BI visuals:&lt;/P&gt;
&lt;P&gt;import powerbi from "powerbi-visuals-api";&lt;BR /&gt;import IVisual = powerbi.extensibility.visual.IVisual;&lt;BR /&gt;import VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions;&lt;BR /&gt;import VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions;&lt;BR /&gt;import IVisualHost = powerbi.extensibility.IVisualHost;&lt;BR /&gt;These are essential to hook into the Power BI visual lifecycle (constructor, update, etc.).&lt;/P&gt;
&lt;P&gt;2. What’s Available?&lt;/P&gt;
&lt;P&gt;To know what's available: Install the type definitions: npm install powerbi-visuals-api. Use your editor's IntelliSense (VS Code works great). Explore the source/type definitions in node_modules/powerbi-visuals-api/.&lt;/P&gt;
&lt;P&gt;Look into: powerbi.DataView, powerbi.extensibility and powerbi.visuals. These have everything from data shapes to formatting to capabilities.&lt;/P&gt;
&lt;P&gt;3. Third-Party Libraries&lt;/P&gt;
&lt;P&gt;You can use libraries like d3, lodash, or moment, but always check the pbiviz.json config (under externalJS) and package them correctly.&lt;/P&gt;
&lt;P&gt;What Belongs as a Private Class Property?&lt;/P&gt;
&lt;P&gt;Put in private anything that: Represents persistent elements or references (like svg, host, textValue, etc.). Is used across multiple methods in your class. Needs to retain state between updates (like configuration, selections, etc.).&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;private svg: Selection&amp;lt;SVGElement&amp;gt;; // used in constructor &amp;amp; update&lt;/P&gt;
&lt;P&gt;Note: Don’t define as a class property if it’s: Only needed inside one method. Temporary for a calculation (like let radius = ... in update()).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer community threads and Microsoft official documents and articles.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visuals-development-Issue-with-font-quot-DIN/m-p/4410837" target="_blank"&gt;Solved: Power BI Custom Visuals development - Issue with f... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Using-D3-v5-for-developing-custom-visual/m-p/506896" target="_blank"&gt;Solved: Using D3 v5 for developing custom visual - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/developing-Custom-Visual-with-Table-Data-Binding/m-p/74380" target="_blank"&gt;Solved: developing Custom Visual with Table Data Binding - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visuals-Community/m-p/667211" target="_blank"&gt;Power BI Custom Visuals' Community - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/develop-power-bi-visuals" target="_blank"&gt;Develop custom visuals in Power BI - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/environment-setup?tabs=desktop" target="_blank"&gt;Setting up an environment for developing a Power BI visual - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/" target="_blank"&gt;Power BI visuals documentation - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.microsoft.com/en-us/power-platform/products/power-bi/developers/custom-visualization?msockid=2c82ae94ebae62c410d9bb54eafc63ab" target="_blank"&gt;Power BI Custom Visuals – Data Visualization Tools | Power BI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/Custom-Visual-in-Power-BI/ba-p/2814108" target="_blank"&gt;Custom Visual in Power BI - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://answers.microsoft.com/en-us/msoffice/forum/all/power-bi-custom-visual-development-issue/524add1b-572c-4fdc-887a-144acbf93eb9" target="_blank"&gt;Power BI Custom Visual development issue - Microsoft Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If my response has resolved your query, please mark it as the &lt;STRONG&gt;"Accepted Solution"&lt;/STRONG&gt; to assist others. Additionally, a &lt;STRONG&gt;"Kudos"&lt;/STRONG&gt; would be appreciated if you found my response helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 05:19:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/custom-visual-development/m-p/4697685#M61247</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-05-19T05:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: custom visual development</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/custom-visual-development/m-p/4697852#M61250</link>
      <description>&lt;P&gt;Thanks a lot for this wonderful explanation&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 06:57:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/custom-visual-development/m-p/4697852#M61250</guid>
      <dc:creator>animebuff</dc:creator>
      <dc:date>2025-05-19T06:57:39Z</dc:date>
    </item>
  </channel>
</rss>

