Column stats theme


#1

Hi guys, i want to change the color theme of the visualization in a column stat of the Raw data table dynamically, there is a way to access to the column stat visual and set the color theme that i need when i want?


#2

Actually you can use the RDT api to get the id of the column stat visualization and then you can just set the new color config using the set method in the Aktive object, like this:

const colStatId = cf.getVisualization('my-rdt').get('getColumnStatId')('column_name');
const colStatVizualization = cf.getVisualization(colStatId);
colStatVizualization.set('color', yourNewColorConfig);

#3

Hey @emoya. thanks, this really helps me, i just need to update all the column stats color config using the fields config to set the color in all of them.


#4

I understand, you know wanht?, actually you can get all the children visualizations from the Raw Data Table, using this:

cf. getChildVisualizations('rdt_id')

#5

Actually i tried that and was very helpful, thanks @emoya