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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
gibe
Regular Visitor

R powered custom visual: image doesn't scale when I resize the visual

Hi all,

 

I have an old R custom visual (built with old visual tools) that I need to modify.

I haven't found the migration guide to version 3.0 of power bi visual tools, so I created a new package using the same R script and the same capabilities.json.

The custom visual works but it's unusable because the image doesn't scale down automatically to the visual size, as it did with the old version.

The problem does not depend on the script and the package used (gridExtra): I pasted the same R code in the R visual and the image scales up and down as expected.

 

Any idea to solve this issue?

Thanks

pbiviz --version
3.3.2

package.json

{
  "name": "visual",
  "dependencies": {
    "@types/d3": "^5.0.0",
    "core-js": "^3.2.1",
    "d3": "^5.0.0",
    "powerbi-visuals-utils-dataviewutils": "^2.2.1"
  },
  "devDependencies": {
    "powerbi-visuals-api": "^3.8.4",
    "tslint": "^5.18.0",
    "tslint-microsoft-contrib": "^6.2.0",
    "typescript": "3.6.3"
  },
  "scripts": {
    "pbiviz": "pbiviz",
    "start": "pbiviz start",
    "package": "pbiviz package",
    "lint": "tslint -c tslint.json -p tsconfig.json"
  }
}

 

1 ACCEPTED SOLUTION
gibe
Regular Visitor

Hi all,

 

I found the solution. It is necessary to add this line to the visual.ts file.

import "./../style/visual.less";

View solution in original post

1 REPLY 1
gibe
Regular Visitor

Hi all,

 

I found the solution. It is necessary to add this line to the visual.ts file.

import "./../style/visual.less";

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.