cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to pass runtime data into bar chart

LY_10691079
11-Garnet

How to pass runtime data into bar chart

Hi Everyone,

 

I have a Grid widget which displays data based on selected dropdown, also a data filter widget through which I am filtering grid data so now my requirement is I want to display distinct count of each column in Bar chart widget and  once the data is changed it through data filter widget (for the same dropdown)   bar chart data should also change like whatever data present in grid that data's distinct count should available in bar chart at runtime.

 

like in runtime if data change according to the filter (Through data filter widget) that should also change the bar chart count that's it.

can we achieve this functionality in Thing Worx 9.3.1 version.

 

if yes pls guide 

 

I am able to get distinct count in bar chart but next is how it should change while filtering which is in runtime actually, I am not sure 

 

Thanks,

Lav

2 REPLIES 2

Hi @LY_10691079 

 

You can execute bar chart service once grid service completed event. It will be easier to suggest or guide if you post some screenshot of your mashup bindings

 

/VR

@LY_10691079 
I am going to make some assumptions. You are using the dropdown to make a selection. This selection is being sent to a Service as an input parameter.

The service then builds the InfoTable. 

I believe your confusion is how do I include the ChipDataFilter Widget in the processing.

The service which generates the InfoTable needs to have an additional parameter of type "Query"

At the end of the steps which you already have in place you need to add a call to update the InfoTable before it is returned.

let params = {
t: result,
query: FilterQuery
};

result = Resources["InfoTableFunctions"].Query(params);
 

When the service is run the initial time, The fall to the Query function will make no changes to the result.
Now the binding: 

From CreateGrid service all data goes to the ChipDataFilter, The Query is bound to The CreateGrid service and the Grid. 
The Query Changed event is bound to the CreateGrid service, this causes an update on every change.

 

If you have questions please let me know

 

Pehowe
 

Top Tags