Hi team, I'm embedding the dashboard into my app u...
# gooddata-ui
p
Hi team, I'm embedding the dashboard into my app using the React SDK. Is there a way to dynamically change the
display as
of the attributes of all visualization components within the dashboard at runtime?
m
Hi Phuc, In the screenshot I can see only two options for the Location ID. That attribute was just an example? or you have even more attributes-display_as ? Let me check and I will come back with updates.
p
Hi @Mauricio Cabezas. That was just an example. We have dozens of visualization components, and each component has different attributes
m
Hi Phuc, first I would like to point out that the "display as" feature in the Analytical Designer allows users to change how attributes are displayed (e.g., as a label, ID, or other custom format). Also, the GoodData React SDK primarily focuses on rendering existing dashboards and insights and, not on editing insights, for that reason we do not have still the option to embed the Analytical Designer in SDK (only at the moment with Iframe). Thus, unfortunately, I must say we do not have that option. On the other hand, there could be a workaround, for example for every insight you can create and save them with different values in 'display as' then in the dashboard, you can add the 'Visualization Switcher' or, create different dashboards with different values in 'display as' for visualization and add a button in your SDK application allowing you to change the complete dashboard easily. If you provide more details about the use case, I would be happy to submit a Product Feedback on your behalf.
p
It seems there might be a misunderstanding. The screenshot is simply an example of the
display_as
field. What I meant was that I've already set up a dashboard in Analytical Designer and am embedding it into our React app using GoodData's React SDK, with the dashboard ID. For my use case, I have an attribute with two different
display_as
values, one for English and one for another language. The displayed field will change depending on the user's language preference
m
Hi Phuc, If you need to differentiate in only two values (two languages) would not work for you the workaround to create two dashboards for each different language and then create a Button in your application to change or select the dashboard? or in other works, create a Button with the desired language by the user?