Read Custom Label from plugin

Hi

I use webinar_plugins to create my own plugin (it is working great)
I have one parameters that I need to enter manually and to received it when I press on the value.

I thought to add it to Buckets to Custom Label editor, my problem is that I don't succeed to read it from the plugin.
metricDiv.addEventListener('click', () => {
// NEED TO READ THE Custom Label text
// HOW?
}

See below code

const table = visData.tables[0];
const metrics = [];
let bucketAgg;

  table.columns.forEach((column, i) => {
           table.rows.forEach(row => {
      const value = row[i];
      const title = bucketAgg ? `${row[0]} ${column.title}` : column.title;

  

      const metricDiv = document.createElement('div');
      metricDiv.className = 'myvis-metric-div';

       metricDiv.addEventListener('click', () => {
               // NEED TO READ THE Custom Label text 
               // HOW?
       }

}

Thanks

I will ping the visualization engineer who worked on this. He an provide more insights :slight_smile:
cc / @ppisljar @thomasneirynck

Thanks
Rashmi

Thanks a lot, it is very important for me.
The custom label is not must, I can. Read also from option tab.

I need to read a string from visualization plugin (from custom label or option tab)

Thanks again

I succeed to read from option tab
vis.params.ZZZ

Thanks

Thanks for updating the thread.

Rashmi

thats correct, to get it from options tab you can access it on vis.params.yourparametername

to read the custom label, you can read it from vis.aggs

  • find the aggregation you are interested in .... like Count or something you set in your settings
  • call makeLabel() on it

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.