6 Replies Latest reply on Jan 11, 2018 1:43 PM by cbasile RSS
    cbasile Explorer

    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 !

      • Re: Automatic chart
        carlesc Heavyweight Champ

        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.

        • Re: Automatic chart
          nkhose Creator

          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)

          • Re: Automatic chart
            cbasile Explorer

            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 !

              • Re: Automatic chart
                nkhose Creator


                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

                • Re: Automatic chart
                  tcoufal Communicator

                  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)