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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Regarding TimeSeries Chart

DMu3
12-Amethyst

Regarding TimeSeries Chart

 Hello,
I created new mashup. I am using time series widget.  i ca able to view the data in time series chart. But i can't able to get the graph.. Can u please help me to do that? I attached my screenshot below.

1 ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:DMu3)

@DMu3 

 

It could be useful to have the mashup and relevant entities, but form the screenshot we see invalid date for the X axis.

This would indicate that either you did not fill XAxisField with a correct field or the datasource has not got any timestamp field, which is required for time series.

 

Can you clarify how do you get the data from ?

 

Kind regards

Christophe

 

View solution in original post

17 REPLIES 17
cmorfin
19-Tanzanite
(To:DMu3)

@DMu3 

 

It could be useful to have the mashup and relevant entities, but form the screenshot we see invalid date for the X axis.

This would indicate that either you did not fill XAxisField with a correct field or the datasource has not got any timestamp field, which is required for time series.

 

Can you clarify how do you get the data from ?

 

Kind regards

Christophe

 

DMu3
12-Amethyst
(To:cmorfin)

Sometimes in x axis it shows date and time, and in y axis it shows number... if x axis shows date and time means then y axis cant able to show the number it shows NaN and vice versa. 
Okay, i will check that one, but why i can't able to see my graph... can you please help me to do that?

cmorfin
19-Tanzanite
(To:DMu3)

Hi @DMu3 

 

If you get invalid date or NaN either on x or y, the graph won't be displayed because some input are not understood.

So you need to check the setup of the timeseries chart for the data field and also the correctness of incoming data.

Maybe query incoming values through a different mean (maybe through QueryNumberPropertyHistory service for example) to ensure you get what you expect.

 

Hope this helps

Christophe

 

DMu3
12-Amethyst
(To:cmorfin)

Hii,

How to store all the incoming data in thing to datashape. I created value stream also. But data are not storing in datashape. For storing incoming data to shape, what kind of service i should use? 

cmorfin
19-Tanzanite
(To:DMu3)

Hi @DMu3 

 

Datashape are used to define field of some data. This is then use to format an infotable or datatable for example.

Datashape do not store data themselves.

 

If you have a property that receives data and you want to store the values, then you can defined the property as logged (in attribute of property), then add a value stream to the Thing.

The data is going to be stored for hat property.

You can query the values using services such as QueryNumberPropertyHistory or QueryStringPropertyHistory ...

 

Regards

Christophe

 

DMu3
12-Amethyst
(To:cmorfin)

Hii,
Actually i am getting incoming json data in properties and alerts tab.  I used services to get particular value from json.  I need to show that data in mashup.. So i created mashup, in that i used time series chart.  In mashup, i called that services which i created in thing.  If i view mashup means i can't able to see the values.. Current values are displaying but graph is not at all coming.. I attached my Screenshot below..

DMu3
12-Amethyst
(To:DMu3)

Another Screenshot

cmorfin
19-Tanzanite
(To:DMu3)

Hi @DMu3 

 

On the mashup there is a configuration issue.

If you bind to the Data field of the tiemseries chart, you should not use the Datasource1, Datasource2 ... and you should set SingleDataSource.

 

If yo want to have multiple datasource, then bind to Datasource1, datasource2 ... and uncheck SingleDatasource checkbox.

 

As a troubleshooting step, for a start you can possibly unbound your service and keep only the QueryPropertyHistory service bound to Data as a unique datasource, to chekc you can have your chart ok ... first make sure that QueryPropertyHistory  return expected values.

Once this works, you can bind it to Datasource1 instead of Data, and then add your service to Datasource2 and untick SingleDatasource attribute

 

It might become easier to open a case to Technical Support though.

 

Regards

Christophe

 

DMu3
12-Amethyst
(To:cmorfin)

Hello,
In QueryPropertyHistory, i am getting json data, i need to get particular value from json thatswhy i  created another service to get particular value. So, which service i should use in mashup? 

cmorfin
19-Tanzanite
(To:DMu3)

Hi @DMu3 

 

QueryPropertyHistory returns an infotable not a json...so I am a bit confused.

In any case the input to the timeseries chart should have values and timestamp.

So you may need to create a service that collect your input into a infotable with a value field as number and a time field as datetime type.

 

Regards

Christophe

 

DMu3
12-Amethyst
(To:cmorfin)

Hii,
In properties and alert tab, am getting only json data. so I created  service for getting the particular value from json. okay, in mashup i called that service which i created in thing, i attached my screenshot below.

DMu3
12-Amethyst
(To:DMu3)

In that screenshot, i can't able to set x axis and y axis but the values are updating automatically, i can't able to see my graph also. please help me to do that.

cmorfin
19-Tanzanite
(To:DMu3)

Hi @DMu3 

 

Can you execute the service Mqttservice99 manually from the thing and show what is its output ?

 

Thanks

Christophe

 

DMu3
12-Amethyst
(To:cmorfin)

Attached my screenshot below

cmorfin
19-Tanzanite
(To:DMu3)

@DMu3 

 

Thank you for this.

So your service is returning one value, this won't work for a timeseries chart.

You do need an output with value and timestamp.

This is why you get invalid date in the chart, because there is not DATETIME property.

So in your service when you build the result variable you need to add also the timestamp of when this value has been received, maybe by parsing it in the json if present in there or making it up, but you do need a timestamp having the type DATETIME.

 

The other issue I see is that your service is returning only one value, I don't think this will work because the chart needs more than one value to draw line (it might work if you change the chart type to Marker but even then you will ever see only one point because each time the chart will be refreshed).

So if you receive single data each time, one way to make it work would be to create a new property of type info table with a datashape similar to value NUMBER and time DATETIME and have your service add to it each time the it is called and output this as the result. 

In that way the info table will keep on growing with the history of the values and the chart will be showing that.

 

 

Kind regards

Christophe

 

DMu3
12-Amethyst
(To:cmorfin)

Thankyou for your reply, Now it works properly.. 

cmorfin
19-Tanzanite
(To:DMu3)

Hi @DMu3 

I am pleased that it works for you now.

It would be useful if you could mark the previous reply as correct answer as this will help others with similar issue to find the answer more quickly, especially since there has been quite a few exchanges on this thread.

 

thank you

kind regards

Christophe

 

Top Tags