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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

timeline widget

anaclos
12-Amethyst

timeline widget

Hello, I need some help with the timeline widget. The DataSource is a JSONData but in String format. I can't find the name of the attributes that the JSONData must have. On the web I found this help
  {
     "ending_time": 1355761900000,
     "starting_time": 1355759910000,
     "label": "person b"
}
but I can't graph anything. I would appreciate it if you could provide me with some documentation of that widget.

I am sending a snapshot of the widget properties

JSONData.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
ganeja
11-Garnet
(To:anaclos)

Hi @anaclos 

 

The PTC.SCA.SCO.DygraphUtils thing contains a service that helps generate data in the correct format for the JSONData property on the widget. The GenerateDygraphData service provides history data for a specified list of properties, either from the value stream for a thing, or from the database, in a format for the Dygraph widget to display.

 

JSONData—The data used in the chart is a JSON, sent in string format. A string is used to send the information, rather than an infotable, because infotables are passed to the widget line by line, requiring further manipulation of the data for it to be fed to the chart. Using a string allows the data to be sent all at once to the Dygraph library to render the chart. The format for this JSON is CSV. You can either use the GenerateDygraphData service of PTC.SCA.SCO.DygraphUtils thing or a service that calls GenerateDygraphData, to convert an infotable to CSV.   Given a valid set of input, this service returns data in CSV format that can be bound to the JSONData property in the widget. 
 
If you donot provide labels , the JSONData can provide the data label.
For more information, see: http://dygraphs.com/data.html#csv.
Another helpful link could be 
 
 
Thanks
Gunjan Aneja

View solution in original post

5 REPLIES 5
slangley
23-Emerald II
(To:anaclos)

Hi @anaclos.

 

Can you confirm which widget you're actually using?  Did it come with another extension or was it previously downloaded from the Marketplace?  It may also be helpful to know which ThingWorx version you are running.

 

Have you looked at the out-of-the-box time series chart?  Is there some reason this one would not work for your use case?

 

Regards.

 

--Sharon

anaclos
12-Amethyst
(To:slangley)

Hi, @slangley . I am using Manufacturing Apps 8.4. The widget is timeline chart. 

TimeLine.png

I need something like a Gantt Char showing labels inside the bars, between two specific dates and times. Thank's

GanttChart.png

slangley
23-Emerald II
(To:anaclos)

Hi @anaclos.

 

Since this is a Mfg Apps extension, I am moving your post to the Mfg Apps queue for better visibility into the issue.

 

Regards.

 

--Sharon

ganeja
11-Garnet
(To:anaclos)

Hi @anaclos 

 

The PTC.SCA.SCO.DygraphUtils thing contains a service that helps generate data in the correct format for the JSONData property on the widget. The GenerateDygraphData service provides history data for a specified list of properties, either from the value stream for a thing, or from the database, in a format for the Dygraph widget to display.

 

JSONData—The data used in the chart is a JSON, sent in string format. A string is used to send the information, rather than an infotable, because infotables are passed to the widget line by line, requiring further manipulation of the data for it to be fed to the chart. Using a string allows the data to be sent all at once to the Dygraph library to render the chart. The format for this JSON is CSV. You can either use the GenerateDygraphData service of PTC.SCA.SCO.DygraphUtils thing or a service that calls GenerateDygraphData, to convert an infotable to CSV.   Given a valid set of input, this service returns data in CSV format that can be bound to the JSONData property in the widget. 
 
If you donot provide labels , the JSONData can provide the data label.
For more information, see: http://dygraphs.com/data.html#csv.
Another helpful link could be 
 
 
Thanks
Gunjan Aneja
anaclos
12-Amethyst
(To:ganeja)

Hi, @ganeja  Your explanation is very clear. I will try your suggestions. Thank you. Ana Clos

Top Tags