Not
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
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.