Forum Discussion

Sunkari's avatar
Sunkari
Icon for Responsive Resident rankResponsive Resident
10 years ago

Change chart or report background color based on the user

Hi All,

 

How to change chart or report background color based on the user. We have one report in our application and integrated same in an external application using Rest API. We have different clients who have access to this report.

 

The requirement is to change chart color/background color of the report based on client.

 

Could you please provide your inputs here. 

3 Replies

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Icon for Community Support rankCommunity Support

    Sunkari,

     

    Diving into the source code, you may find how to change the color of Page Background.

    <div class="visualBackgroundContainer" style="opacity: 1; background-color: rgb(255, 255, 255);"></div>

    Based on my research, the new Power BI JavaScript API will allow you to write code that can securely pass through the iframe boundary, so that your application can programmatically perform an action in a report and listen for events from actions that users make from within the reports themselves. However, I do not find a way to change the background color for the time being. You may submit an idea or leave a comment at GitHub.