Legends partially or completely missing in png downloads of workshop XY charts

Hello all,

I am working on a dashboard on Workshop. When I try to download an XY chart using the custom chart export option, the legends are cut off either completely or partially as shown in the images below. Is there a way to fix this?

// Content redacted, so ignore the black/gray/green areas


In the first image, there is whitespace on the right of the main chart which should ideally be where the legends are listed but it’s empty.

The legend clipping you are seeing during custom chart export is a known rendering limitation of the export function — the export canvas does not dynamically expand to accommodate legends positioned outside the main chart plot area. This is not documented as a known bug, but the behavior is consistent with how the export captures the chart bounds.

## Most likely cause: legend position

The whitespace on the right of your exported chart is the clearest indicator. When the legend is positioned to the **right**, it renders outside the primary chart plot area. The export canvas captures the chart at a fixed size and the legend either gets clipped at the boundary or is omitted entirely, leaving the whitespace you are seeing.

## Workaround 1: Change legend position to bottom or top

In the Chart XY widget configuration, navigate to the **Legend > Positioning options** section and switch the legend position from **Right** to **Bottom** or **Top**. This places the legend within the vertical flow of the chart rather than extending it horizontally beyond the plot area, making it far more likely to be captured correctly within the export canvas.

This is the most reliable immediate fix and requires no structural changes to your chart configuration.

## Workaround 2: Use “Download chart as image” instead of “Custom chart export”

The Pie Chart documentation confirms these are two distinct export modes in Workshop. If your XY chart widget also offers a **Download chart as image** button (the download icon in the top right of the widget on hover), try that path instead of the **Custom chart export** option. The two modes use different rendering paths and one may handle the legend bounds more gracefully than the other.

## Workaround 3: Switch to the Vega Chart widget

If neither of the above resolves the issue and you need precise control over export rendering, the Chart XY documentation itself recommends the **Vega Chart** widget as an alternative when the Chart XY widget does not enable desired functionality or formatting. Vega Chart gives you full control over the chart specification including legend placement and sizing, which would let you explicitly define the export canvas dimensions to include the legend.

## If the issue persists

This appears to be a rendering bug in the custom chart export path. File a support ticket with Palantir and include:

- The specific legend position setting you are using

- Screenshots showing the whitespace (which you already have)

- Whether the issue reproduces with both export modes or only custom chart export

- Your Workshop module RID: `ri.workshop.main.module.c7dc58b4-856a-4c7c-967e-5e770aaf6f51`

The most practical immediate fix is switching the legend position to **Bottom** — that alone resolves the clipping in the majority of cases.