The CreatorCon Call for Content is officially open! Get started here.

Ui Builder Data Visualization Data Sources Dynamic Binding with filter

manav-takoliya
Tera Contributor

manavtakoliya_0-1709298484642.pngmanavtakoliya_1-1709298514172.png



How can i use my state variable inside filter condition of data visualization component.

I just want to make one column dynamic where region is @STate.region. But i dont know how to access state inside filter of data visualization widget. 

Is there any way to get some specific data on condition based on state variable.............


Regards,

Manav Takoliya

3 REPLIES 3

Jan Ujcic1
Tera Contributor

Hi Manav, were you able to solve this issue? I'm facing the same challenge right now.

 

Thank you and kind regards,

Jan

 

Looks like you might not be able to use report sources to tie state to the filter but you can use the data viz data resources as per the docs: Use a local data instance with a data visualization

 

It is also mentioned in the uib component docs 

lauri457_0-1759300515105.png 

 

I tested this with the single score viz: 

  1. Add the correct data resource for your component. Take note of the description for instructions on params
    lauri457_3-1759300931114.png

     

     

  2. In the data source one can bind a state param to the filter lauri457_4-1759301020971.png

     

  3. Select define data manually in the data sources accordion and bind @...output.result from the data resource to the data
    lauri457_12-1759302541513.png

     

  4. This way the filter can be tied to state. For testing I added two handlers to a button, one changes my state param used in the filter and another refreshes the data resource.

     

    lauri457_9-1759302202206.png

     

    lauri457_7-1759302146110.png

    lauri457_8-1759302157086.png

     

     

     

 

Hi lauri457, that did do the trick! Thanks