RDT column stats custom settings


#1

Hey guys I was using the new column stats feature and it is really awesome, but… i have to register some events and specific settings to the histograms and some other column stats, is there any way to do that? :slightly_smiling_face:


#2

Hey @sergioSan actually there are two ways to do that, the first one is getting the column stats visualization and setting the configs that you need, to get the visualization id of the column stat you can use the getColumnStatId function and use that ID, the second way is setting that in the Raw Data Table config using the widgetProps key like this:


.set("columnStats", {
    enabled: true,
    height:70,
    widgetProps: [
        {
            field: 'trip_start_timestamp',
            props: {
                granularity: 'DAY', // Useful just for TIME fields
                limit: 5 // For slicers means 5 rows, for histogram you need to use fixedBars for the number of buckets
            }
        }
    ]
})

#3

I see thank you so much, it really help me, but in order to subscribe to some events i think the first option is the best, you know getting the column stat visualization, Thanks.


#4

Yes, that sounds good, just remember that the filters of the column stats are applied by the Raw Data Table not the Interaction Manager, just that. :grinning::+1:t3: