Rules / Report Design

Visual extends past the page

warning VISUAL_OUTSIDE_PAGE · built in · report layer · scope: Visual

What it checks

Visuals whose box runs past the right or bottom edge of their page by a pixel or more: x plus width beyond the page's width, or y plus height beyond its height.

Each finding names the visual, as cardVisual (3d9c80) on "Overview", or as "Sales by region" on "Overview" when it has a title, at the position line of its visual.json, and its detail gives the overhang past each edge in whole pixels, rounded: 120 px past the right edge, or 70 px past the right edge, 30 px past the bottom edge.

Example

Fires the rule in visual.json
{
  "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.8.0/schema.json",
  "name": "3d9c80144abca427957c",
  "position": { "x": 1200, "y": 90, "z": 1000, "height": 105, "width": 200, "tabOrder": 1000 },
  "visual": {
    "visualType": "cardVisual",
    "query": {
      "queryState": {
        "Data": {
          "projections": [
            {
              "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "Sales" } }, "Property": "Total Sales" } },
              "queryRef": "Sales.Total Sales"
            }
          ]
        }
      }
    }
  }
}
After the fix in visual.json
{
  "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.8.0/schema.json",
  "name": "3d9c80144abca427957c",
  "position": { "x": 1080, "y": 90, "z": 1000, "height": 105, "width": 200, "tabOrder": 1000 },
  "visual": {
    "visualType": "cardVisual",
    "query": {
      "queryState": {
        "Data": {
          "projections": [
            {
              "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "Sales" } }, "Property": "Total Sales" } },
              "queryRef": "Sales.Total Sales"
            }
          ]
        }
      }
    }
  }
}

The page is 1280 pixels wide. The card starts at 1200 and is 200 wide, so it ends at 1400, and the finding reads cardVisual (3d9c80) on "Overview" with 120 px past the right edge. The fix moves it to 1080, where its right edge meets the page's.

Why it matters

A report page has the width and height its canvas settings give it, and Microsoft's schema for visual.json describes every visual's box as lying within its page. A visual that runs past the right or bottom edge has part of its box off the page, and whatever it draws there, the last column of a table, the end of an axis, the figure on a card, is off the page with it, outside the area the report was laid out to show.

How to fix it

In Power BI Desktop, select the visual, open the Format pane, select the General tab, and under Properties change its Position, the horizontal and vertical position in pixels from the top-left corner of the canvas, or its Size, the height and width in pixels, until it ends inside the page. If the page should be larger instead, change its size: with nothing selected on the page, the Visualizations pane shows Format page options, and under Canvas settings you can choose a larger Size, or the Custom type to set the height and width in pixels yourself.

In visual.json the box is position: bring x or y back, or shrink width or height, as the example does with x. For a visual inside a group, move or resize the group.

When to ignore it

A decorative shape or image sized to run past the edge on purpose, such as a background band meant to reach the page's border, loses nothing a reader needs; ignore the finding on it. For a visual that shows data there is no legitimate exception.

To ignore this rule on one visual, add { "name": "pbiplint.ignore", "value": "VISUAL_OUTSIDE_PAGE" } to the annotations array of its visual.json. Power BI Desktop keeps the annotation. To turn the rule off for a whole project, set "VISUAL_OUTSIDE_PAGE": "off" under rules in pbiplint.config.json.

Quirks

Check a report for this Improve this page