When theming is enabled, the ArcGIS for Power BI visual applies colors from your selected Microsoft Power BI theme to both the Power BI data layer and map tools. Additionally, you can apply visual configuration presets by exporting the ArcGIS for Power BI theme snippet and incorporating it into custom themes.
Note:
See Use report theme in Power BI Desktop and set visual property defaults and visual styles before beginning the steps in the following sections.
Enable theme toggle button
To enable the theme toggle button, complete the following steps:
- Ensure Power BI data is added to the ArcGIS for Power BI visual.
- In edit mode, access the Visualizations pane.
- Click Format your visual.
- On the Format your visual tab, under Theme, enable the toggle button.
Apply high contrast mode
See the Microsoft topics on High-contrast support in Power BI and Change color contrast in Windows for more information on setting high-contrast mode.
- High-contrast mode is not applied in ArcGIS for Power BI by default. You must enable the Theme toggle button.
- High contrast will be applied only when the current basemap spatial reference is WKID-102100. This allows switching to well-known basemaps (light gray canvas or dark gray canvas), which provides contrast with the data layer.
- High contrast is only applied to data layers. Feature layers and join layers are currently not supported.
Apply Power BI theme to ArcGIS for Power BI visual
When the Theme toggle button under the Format your visual tab is enabled, the selected theme is applied. You can click the View tab in Power BI Desktop to see which colors are applied. The data layer color on the map is set as Color 1 under Theme colors. This is the default color without adding data to the Color field well. The map tools color is also based on Color 1.
Note:
When using a string field in the Color field well, the data layer colors are based on the Theme colors array.
When using a numeric field in the Color field well, the data layer colors are based on the Divergent colors in the theme.
Under Symbol styling, the color settings, such as the color ramp, are set by the Power BI theme and will be disabled.
Considerations
Keep the following in mind:
- Themes are only applied to data layers. Feature layers from ArcGIS and join layers are not currently supported.
- Themes currently support points, polygons, and polylines. More complex symbols, such as image symbols, are not supported
- Themes are applied to simple, unique value, and class color renderers only. For example, heat map renderers are not supported.
- Editing symbol colors is disabled when the Theme toggle button on the Format your visual tab is enabled as colors are determined by the theme.
- When the Theme toggle button is disabled, the data layer colors are reset to their default values.
Export theme
You must sign in to ArcGIS.
Note:
See Use report theme in Power BI Desktop and set visual property defaults and visual styles before beginning the steps in the following sections.
- In the map tools, open Settings
.
The Login|Settings pane appears.
- Click the Settings tab
.
- Under the Extract theme JSON as section, select Theme snippet or Theme file.
Theme snippet is the default.
- Optionally, click Include basemap if you want to include the currently selected basemap as the default basemap in your theme.
- Optionally, click Include ArcGIS layers if you want to include the current ArcGIS layers on the map in your theme as default.
These layers are added when you apply this theme to other reports.
- Click Download to save it as a file, or click Copy to copy to your clipboard.
The Microsoft Azure administrator must allow the Download privilege within your organization for you to be able to download. You can copy without specific permissions. For more information, see the Handle exported ArcGIS for Power BI theme JSON section below.
Handle exported ArcGIS for Power BI theme JSON
It is recommended that you first learn JSON structure and usage and gain experience using, selecting, manipulating, and importing custom Power BI theme files. To learn more, see Use report themes in Power BI Desktop .
Export Theme snippet
The theme snippet cannot be used on its own as a theme file. It should be inserted into an existing theme JSON file. The theme snippet is formatted as shown below:
"esriVisual": {
...all settings for ArcGIS for Power BI visual
}
In an existing theme JSON file, paste the snippet into the proper location. The key is finding the parent visualStyles property and placing the esriVisual snippet as its child. This can be above or below style/properties for other visuals. If placed above other visuals, remember to add a comma.
{
"name": "Existing Custom Theme",
"icons": [],
"dataColors": [...],
... additional global properties,
"visualStyles": {
... styles/properties for other visuals,
<INSERT "esriVisual" snippet here>
}
}
In some theme JSON files, the visualStyles property may not exist. If that is the case, add the visualStyles property as the last property before the closing bracket as shown below. Then paste the esriVisual snippet inside.
{
"name": "Default Theme",
"dataColors": [...],
...,
<INSERT “visualStyles” here>
}
Export theme file
Exporting as a theme file gives you a fully structured theme JSON file as shown below:
{
"name": "ArcGIS for Power BI theme",
"visualStyles": {
"esriVisual": {
... all settings for ArcGIS for Power BI visual
}
}
}
The content of this theme file contains only esriVisual properties, and no other properties of the default or applied theme. This file can be uploaded as-is into Microsoft Power BI Desktop as the current theme, and all ArcGIS for Power BI visuals created thereafter honor the theme settings it contains. Its usefulness is targeted because it only affects the ArcGIS for Power BI visual. It does provide an example of the fully structured theme file and where the esriVisual property should be placed, and you can also extract just the esriVisual snippet from this file for use in an existing theme JSON file.