Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
You can change the type of an existing visual in a Power BI report, such as changing a bar chart into a pie chart. See a list of available out-of-the-box visual types.
How to change an existing visual type using the API
Use the changeType method and specify the desired type.
changeType(visualType: string): Promise<void>
Code example
The following code example shows how to change an existing visual type to a pieChart type.
await visual.changeType('pieChart');
Considerations and limitations
changeTypewill fail if the target visual type is not installed.- Different visual types have different data binding rules. If any data fields were applied to a visual and
changeTypeis used, then the data fields might be mapped to a differentdataRoleif such mapping is defined on the visual type metadata. If no such mapping exists between the visual types,changeTypefails. See Visual data binding to learn more. - If you have a visual calculation or a hidden field in your visual and the target visual doesn't support visual calculation,
changeTypewill fail.