need help
189 TopicsPower BI Custom Visuals development - Issue with font "DIN" for SVG
hello dear people, in Power BI Custom Visuals I'm trying to develop a simple card visual. There I want to have the possibility to change the fonts of my elements in my SVG. I do this with the help of the FontControl inside my Custom Visual project file. When I change the font to "DIN", the FontControl does not apply it to its element, instead uses something else. I looked up with the console.log on Power BI Webservice which value it uses instead of "DIN". And it shows "wf_standard-font, helvetica, arial, sans-serif" when I select "DIN" in my FontControl. The FontControl has bold, italic, underline, fontSize and fontFamily as properties. As an alternative I tried to use the FontPicker but unfortunately had the same outcome as the FontControl. I looked up several other posts in our Power BI Forums regarding to font, with no success for me. https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/766692 https://community.fabric.microsoft.com/t5/Desktop/Fontfamily-DIN-doesn-t-work-in-theme-json/m-p/1706186#M676337 https://community.fabric.microsoft.com/t5/Desktop/Change-fontfamily-power-bi-report/td-p/562284 https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/773796 For a different approach I tried to make use of the Custom Themes of Power BI Desktop. With a .json I set the fontFamily globally to "DIN" and with "wf_standard-font, helvetica, arial, sans-serif" too. When I loaded my Custom Visual to Power BI Desktop, the results are the same as prior to my approach with FontControl/FontPicker. Here are the links for the implementation of Custom Themes in Power BI: https://github.com/deldersveld/PowerBI-ThemeTemplates/blob/master/README.md https://dataveld.com/2018/01/05/control-and-expand-your-power-bi-font-selection-with-themes/ https://community.fabric.microsoft.com/t5/Desktop/Theming-Usage-of-the-quot-Segoe-Bold-quot-font/td-p/496531 Here are screenshots of my project as reference: And for some reason in the format pane under General > Title, the font uses the correct "DIN" in contrast to my Visual > "Wert" with "DIN": thanks in advanceSolvedJSON issue for new card visual
I have the following JSON code for the NEW card visual. It is applying most of what I'm specifying, but it ignores "padding" and it ignores the color specification for the card value. What do I need to change to fix this? "cardVisual": { "*": { "labels": [ { "color": { "solid": { "color": "#666666" } }, "position": "BelowValue" } ], "categoryLabels": [ { "color": { "solid": { "color": "#666666" } } } ], "values": [ { "color": { "solid": { "color": "#666666" } }, "horizontalAlignment": "Center" } ], "padding": [ { "top": 0, "left": 0, "right": 0, "bottom": 0 } ], "cards": [ { "fill": { "show": false } } ] } }Power BI – How to Reset Slicer to Default Value Based on Another Slicer Selection?
Hi Community, I have a Currency slicer (INR / USD) and a Display Amount slicer with values: ONES THOUSANDS LAKHS CRORES MILLIONS BILLIONS Requirement When INR is selected → Display Amount slicer should show ONES, THOUSANDS, LAKHS, CRORES When USD is selected → Display Amount slicer should show ONES, THOUSANDS, MILLIONS, BILLIONS THOUSANDS should be the default selection for both INR and USD When switching from USD → INR (or vice versa), the Display Amount slicer should reset back to THOUSANDS automatically, instead of keeping the previously selected value (like MILLIONS). What I’ve Tried Created a DAX measure returning 1 / 0 to filter Display Amount values Applied the measure as a visual-level filter The visibility works correctly, but Power BI does not reset the slicer selection to THOUSANDS when the Currency slicer changes Any best practices or workarounds (bookmarks, disconnected tables, etc.) would be greatly appreciated. Thanks in advance! 🙏 Fig 1: Fig 2:Custom format pane: How to implement checkboxes?
Hi, I want to add checkboxes for multi-selection (see screenshot) to a custom format pane, but I cant find any documentation how to implement them. For now I am helping myself with ToggleSlices, which gets the job done, but they are not quite checkboxes. Any ideas and replies appreciated! 🙂Visualisation (Slicer and Button Slicer)
Hi everyone, I hope you all have a nice day. I want to ask (pictures attached), I gave an example of me using visualisation of "Button Slicer (Top)" and "Slicer (Bottom)" in the picture, I have a table where I have Reporting Date column then I make custom column for the quarters and months. The "Year" in the slicer is from Reporting Date hieararchy (Year), but the quarter and month in the slicer, they both are custom column that I made from the Reporting Date column (so they are not the hieararchy of "Reporting Date"). My questions (I don't mind if you answer with "Slicer" visualisation or "Button Slicer" visualisation): In Picture 1, If I select Q1 and it turns grey, how do the visualisation slicer for months turns black (for Jan, Feb, Mar) without me selecting the Quarter slicer? In Picture 2, If I select any month (for example: Aug) and it turns black, how do the visualisation slicer for quarter turns grey (Q2) without me selecting the Quarter slicer? In Picture 3, If I select Year "2025" and it turns black, how do the visualisation slicer for quarter and months also turns black without me selecting Quarter and Month slicer? Please kindly help me answer my questions. Thank you in advance. God bless. 😊🙏1.8KViews0likes1CommentScales settings for Charticulator
Hello everyone, when using Charticulator Community Version (Editor), I am unable to save the color of Scales. Regardless of whether I cancel the Auto update values setting, I can see that it is the set color during editing. However, when saving and back to the report returns the default color. I don't know if it's because I didn't set it up correctly or if it's a bug in the software itself?Solvedadd next button to the images
Hello, We often like to add images to Power BI. However, when we add an image, we typically create a slicer next to it and number the images. Then, users click on these numbers to access the images. But what I want is, when there are multiple images, users can click on a "next" button like this to navigate through the images. Is there such a feature in Power BI? Can this be done?acquireAADTokenService in PowerBI custom visual
Hello I'm trying to implement a custom visual that uses the authentication API following the documentaion. Though I'm using API 5.9.1, I don't have access to the service this.acquireAADTokenService(). It is not part of the IVisual interface. Any clue how to access this service ? Is there some sort of injection mecannism? Thanks for your help.Dynamically define dropdown list in custom Power BI visual
Does anyone know how to dynamically define the elements of a drop down formatting option for a custom Power BI visual? I want my users to upload some photos in Advanced Edit mode, and then be able to select these photos on the formatting pane. In the below simple, hardcoded example, I can build up the object dynamically, but then when I select from the drop-down, that value is not showing up as the selected value once the drop-down is unselected. Here is my code: capabilities.json: "objects": { "dataPoint": { "properties": { "enum1": { "type": { "enumeration": [] } } } } } In settings.ts I've created the formatting card, but I populate it in a custom function: defineEnum1() { const enum1 = new formattingSettings.ItemDropdown({ name: "enum1", displayName: "Enum1", value: { "displayName": "Val 1", "value": 1 }, items: [ { "displayName": "Val 1", "value": 1 }, { "displayName": "Val 2", "value": 2 }, { "displayName": "Val 3", "value": 3 } ] }); this.dataPointCard.slices.push(enum1); } I then call this function in my update() function. Also tried calling it in getFormattingModel(), but the results are the same. The result is that the value of the drop-down is always the one I define in the code. (If I leave value as empty, it'll always be null.) I _think_ the problem is that since selecting a value from the drop-down is considered a change, the defineEnum1() function is called as a result, and overwrites the selection in the drop-down. But I couldn't figure out a way to work around this, and I also couldn't find any source code on GitHub that achieves the same. Any advice would be much appreciated.SolvedPBIVIZ not running update nor saving text objects
Hello guys, After updating everything, some things stopped working. Created a new project, and just added the basic stuff to test changes. First encounter: Update didn't trigger, when resizing or doing filtering. Second encounter: Objects with type "text" automatically reset/clears, but not numeric, integer or boolean. Here is a video (Could't embed it for some reason): https://www.youtube.com/watch?v=f_kTw1X-nDc visual.ts: "use strict"; import "./../style/visual.less"; import powerbi from "powerbi-visuals-api"; import DataView = powerbi.DataView import IVisual = powerbi.extensibility.visual.IVisual; import VisualObjectInstance = powerbi.VisualObjectInstance; import VisualObjectInstanceEnumerationObject = powerbi.VisualObjectInstanceEnumerationObject; import VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions; import VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions; import EnumerateVisualObjectInstancesOptions = powerbi.EnumerateVisualObjectInstancesOptions import { VisualSettings } from "./settings"; export class Visual implements IVisual { private target: HTMLElement; private settings: VisualSettings; constructor(options: VisualConstructorOptions) { console.log('VIS - Visual constructor', options); this.target = options.element; if (document) { } } public update(options: VisualUpdateOptions) { console.log('VIS - Visual update', options); this.settings = Visual.parseSettings(options && options.dataViews && options.dataViews[0]); } private static parseSettings(dataView: DataView): VisualSettings { return <VisualSettings>VisualSettings.parse(dataView); } public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject { return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options); } } settings.ts: "use strict"; import { dataViewObjectsParser } from "powerbi-visuals-utils-dataviewutils"; import DataViewObjectsParser = dataViewObjectsParser.DataViewObjectsParser; export class VisualSettings extends DataViewObjectsParser { public vissettings: VISSettings = new VISSettings(); } class VISSettings { public token: string = ""; public canvasId: string = ""; public gridId: number = 0; } I'm currently lost on what could be wrong, and I'm definitely no expert (the visual I updated was made 5 years ago). All help is appreciated. Best regards, Nikolas