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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Automatic chart

cbasile
1-Newbie

Automatic chart

Hello everyone


I am currently discovering Thingworx and there is a feature that i don't find.
I am doing a application which get data from lot of sensors (like connected house) and i would like to get a chart whit the data of each sensors.

The point is that each house get a different number of sensor so i would like to create a chart for each sensors (sometimes i will need 40, sometimes 10).

I can get the list and number of sensors for each house.

Is there any way with a script to create a chart since i can create datashape whit script ?

Thanks !

1 ACCEPTED SOLUTION

Accepted Solutions
nkhose
1-Newbie
(To:cbasile)

Hi

Thanks for the reply

In that case if you choose 1 house and we get suppose 30 sensors , you need 30 time charts so i think you should

use the repeater widget the service will loops for 30/times in this case  i.e Data  that we bind for repeater widget, then

you can pass the mashup name to repeater widget where time series chart is drawn  with necessary parameters configured (if needed from the mashup of repeater widget) and next step will be to bind the data source from the service to time series widget .


But i think using repeater widget will not be a good idea .

Hope i got this time

View solution in original post

6 REPLIES 6

You should build charts with the mashup builder, you just use Timeseries Widget and bind All Data from the service which queries Sensors data to the Timeseries chart.

nkhose
1-Newbie
(To:cbasile)

Looks at this thread it will be helpful to start Waveform Chart like in Thingworx

it is possible in your case (sensor data.. ) , it depends on how you storing or retrieving the data (from different data sources) , in the chart itself you can bind those data it may be Single or Multiple data source . Try to build a simple chart then move accordingly .  

If data is big enough you can apply filters on them to sort the data (date time picker , Data filter widget or  sensors drop down to get specific plot)

You misunderstood me i think
i mean i already manage to get a timechart with my data from each sensors.

I want that if the user select one house, he goes on another mashup and automate the fact that the next mashup will load a timechart for each sensors.
Sometimes it will be 10 timecharts sometimes 30.
I want that the mashup get the number of sensors (i already got this) and create alone a timechart for each one with the same modele (X=time and Y=Data with autoscale).

I hope it was more understandable !

nkhose
1-Newbie
(To:cbasile)

Hi

Thanks for the reply

In that case if you choose 1 house and we get suppose 30 sensors , you need 30 time charts so i think you should

use the repeater widget the service will loops for 30/times in this case  i.e Data  that we bind for repeater widget, then

you can pass the mashup name to repeater widget where time series chart is drawn  with necessary parameters configured (if needed from the mashup of repeater widget) and next step will be to bind the data source from the service to time series widget .


But i think using repeater widget will not be a good idea .

Hope i got this time

cbasile
1-Newbie
(To:nkhose)

That is what i was looking for !

Thanks you a lot Nilesh

tcoufal
12-Amethyst
(To:cbasile)

Although Repeater would be usable, I think it won't look very well.

I would suggest to create one Gadget (or several, depending on type of the value being displayed, different color schemas for temperature, humidity etc.). You can add parameters to that Gadget (it is essentially a Mashup), which would define input parameters of your services - ie DynamicTemplate queryPropertyHistory and pass on the Entity name, pass on the StartTime, EndTime, maxvalues and so on. If you display that Gadget you have possibilty to add it into the Dashboard, thus creating the Dashboard in the first place and it allows you set the parameters, For every house I would create a Different dashboard (MultiTanent schema) or just a group (SingleTanent schema). Then it just a matter of configuring Gadget's parameters and send it to appropriate "Destination" (I think that could be achieved by script as well).

Pros - Dashboard is a responsive layout so it will look better across different devices.

You can use Gadgets as stand alone entities in responsive/unresponsive layouts. You can bind Master mashup parameters to them as well.

I think they could be used in Repeater as well (I am not sureabout this one though)

Tomas

Top Tags