UseCase :
I have a usecase where I want to use QuickSight for building a dashboard having Graph charts and tabular data related to sales, fees, city, units sold, purchaseDate etc, statistics.
Requirement :
The Dashboard and its UI components(labels/ filters/ axes/ legends, etc) needs to be localised, as in I will have a language drop-down and selecting any language should change the dashboard accordingly. I need this to be completely dynamic managed using CDK and SDK(no hardcoding in Q.S).
Self PoC :
I did some PoCs around my requirements through the GUI and found that I need to use parameters + calculated fields to achieve localisations. Some Dashboard components like X & Y axes labels, legends do not accept calculated fields and hence were not able to be localised. As a workaround I created independent UI components for Labels and Legends using textboxes on which I was able to embed calculated fields.
(a). Is this the right process of achieving the string localisation of the dashboard or are there better ways ?
I achieved localisation in Legends using tooltips + calculated fields. To this tooltip, I was not able to add symbols adjacent to legend values which typically represents the colour of the metric in the graph.
(a). Is this a limitation ? Are there any workarounds to achieve this ?
Out of the box filter-widget provided by Q.S on the date field like purchaseDate, supports a static level of data granularity at(Day/ Week/ Month). Once user chooses weekly as the base granularity, publishes the dashboard and then updates the granularity to monthly, then just the time intervals increase but the granularity remains weekly. e.g, over a span of 2 months, when user selects weekly then 8 data points should appear on graph and when they select monthly then only 2 data points should appear in the graph but in my experience 8 data points existed for both monthly and weekly.
(a). Is this the expected behaviour of the widget ?
(a). Can you please help me with the mental model on how the localisation will work for components, provided I can pass the translated strings through some other service.
(b). Will the number of sessions increase everytime the Seller Updates the language ?
As of now, can Q.S cannot work on user actionable items using the URL action ? I was able to see it works with simple embedding but to trigger API calls based on few Seller selected fields, is it possible ?
Apologies for multiple queries in a single thread.
Hi @Deepak_Morolia,
i guess many developer are facing the multilanguage issue, me too.
to 1.) Yes is is a workaround to have multiple visuals for each language. But as soon as you will have more than two languages its gets messy and a high administrativ effort. As of today, I would rather use different sheets or even analyses.
to 3.) I guess the number of data points depend on the available data points in the data and will show the same number no matter if weekly, monthly. precisely because you can define the number of data points within the visual.
to 5.) You can use URL actions to perform an API call, in case that is what you are looking for. Here a sample.
(a)Can refer to the blog post in item 2 to see the example. (b) Are you referring to embedded dashboard use case? and the question is “If user change the language of a dashboard, will it create a new session”? If above understandings are correct, in the language changing use case, you are using the same dashboard and pass a new filter and parameter, it will keep the same session. It will create a new session if you are invoking the generate embed url api again
Hi @ErikG and @royyung, thank you so much for the response.
@royyung : I do not want my data in dataset to transform when the Seller updates the language. I just want the visuals like labels, legends, titles, filter and drop down values to transform. Also I observed that in this blogpost example we are hardcoding the Language dropdown and providing the calculated field coding through UI itself. I want to know if we can do this through code instead of hardcoding the logics in Q.S UI itself. I would want to pass in the translated texts from by backend to Q.S.
Can share screenshots why X & Y axes labels, legends can take the parameter?
Please find the SS, here in the Legent Title text box I was not able to embed the calculated field.
Can share screenshots why X & Y axes labels, legends can take the parameter?
@ErikG : Are you suggesting we create separate analysis for each language ? Wouldn’t that cause data duplication ?
@royyung : In the same image above you can find the legend symbols at the bottom left, can we achieve this if i am building my own legend component?
Thanks @ErikG for the inputs and @royyung for this demo link. In this demo, is the underlying dataset same for each granularity ? As in,
(a). Are there 4 different dataset one for each level of granularity and once we select a different granularity it fetches the data from the corresponding weekly/ monthly/ quarterly/ yearly dataset ?
(b). Are you modifying the number of datapoints in the chart property for X axis whenever the granularity is updated ? Is this doable through SDK/ CDK code?
(a). Apologies for not being explicit in my ask. I want to manage my infra, controls, parameters, calculated fields dynamically through SDK code. Even in the blogpost in response 1 there is a substantial amount of hard-codings involved in terms of managing and coding parameter and calculated fields.
(b). Yes I want to have an anonymous embedded dashboard. I do not want to hard code the translation strings for dashboard components on Q.S UI and rather pass it through SDK dynamically. Is this doable at all ? Can you please help me with a mental model or code references of how we can achieve this through CDK/ SDK code ?
Thanks @ErikG for the suggestion, I see I can trigger an API call through URL Action and can also provide dynamic parameter like apiEndPoint/operationType/{productId} ,however let say once I update this particular productId, I do not want this product to appear on my dashboard component again. Is this possible through providing some RULES to this components ? Will this operation reset once this session expires and the dashboard reloads given my data set only refreshes once in 24 hrs. ?
With Just parameter I won’t be able to translate the texts unless I hardcode the value while defining the parameter Controls. I see we can pass a List of values from backend to the parameter definition in Q.S, something like <<dynamicList of translated texts>> to the visuals component using updateParameter API. If I have multiple components then I think I would require to do the same for all of them through multiple parameter objects. Is this the standard way?