Use custom text for data member values


I am using the JSON datasource and I am importing data values like so:

dataSource: {
data: [
"country": "country.1",
"risks": "No",
"count": 12122
"country": "country.2",
"risks": "No",
"count": 537
.... ]

As you see the values of each country is a key or id indicating the specific country. Depending on which language the user is viewing the report it needs to be translated properly. The original key is still needed to identify the value when user clicks on it for further server actions.
I first tried using the customizeCell event, which works fine for altering the text on the fly in grid view. But this wont change the text in the context menus etc.
So is there a way of doing this. If not, can this be implemented?

3 answers

Dmytro Zvazhii Flexmonster July 11, 2018

Hello Chris,

Thank you for your question. The customizeCell approach changes only the representation on the grid. It does not affect the structure inside the Flexmonster. Therefore it cannot be used to support such a use case. Currently, the only workaround is to make the necessary number of the translated data source files. After that, you will need to apply the appropriate data source according to the user’s locale.

For now, we do not have any plans on implementing such functionality. In case you need to increase the priority of this task please contact your client manager to discuss the terms of the customization project.

Let us know if the information above was helpful for you.

Chris July 12, 2018

Thank you. So also not a change that we will get something like 

slice: {
rows: ..
columns: ...
members: [
{ uniqueName: "country1", caption: "Germany" },
{ uniqueName: "country2", caption: "Netherlands" }

I have already implemented it with a translated version of the datasource and that works. Downside is that the whole dataset is much bigger because for each calculated member I need the full translated name of each dimension value instead of only the key/id. And when a user selects a calculated value I have to translate it back to the key/id to be able to use it.

It works for now, but it might be a very nice feature for later on.

Dmytro Zvazhii Flexmonster July 12, 2018

Hi Chris!
Yes, I believe it will be a great feature for our component.
For now, I recommend you to look at this blog post:
Probably you will find there how to reduce dataset size and improve loading time.

Please login or Register to Submit Answer