Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Edit text size for card Visual in powerBI embedded

Hi,

I created a card visal and added data fields in powerbi Embedded. Now I want to edit the text size of the data. Any idea on how to accomplish that? Any help would be appreciated.

 

let response = await page.createVisual('card', layout);
let lastCreatedVisual = response.visual;
await addCardDataFields(lastCreatedVisual.name);
 
async function addCardDataFields(visualname,colName,tblName){
        try{
            let page = await report.getActivePage();
            let visual = await page.getVisualByName(visualname);
            //defining datafields
            let dataField = {
                column: colName,
                table: tblName,
                schema: "http://powerbi.com/product/schema#column",
            };
            // Adding visual data fields
            await visual.addDataField("Values", dataField);
        }
        catch(errors){
            console.log("Error adding Data fields to Card :",errors);
        }
    };
    //
 
Thanks

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Got It! have to use custom theme in the config!

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Got It! have to use custom theme in the config!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.