Troubleshooting
Problem
Using JazzSM 1.1.1 leveraging TDI as a data provider, in the current chart widgets (Line, bar), the data is not getting sorted by the date correctly. When leveraging the old deprecated chart widget, the data came in the correct order. What must we do to have the date ordered in the latest widgets?
Symptom
Dates are being shown out of order in the chart widgets
Cause
Data received from data source is of type string rather than date/time.
Environment
JazzSM 1.1.1 leveraging TDI as a data provider.
Resolving The Problem
Using TDI, add the following javascript to convert that string format into a Date object that DASH can consume.
var dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
return dateformat.parse(conn.TIMESTAMP);
This snippet of code is included in a TDI assembly line that feeds the data to DASH. Specifically it is used in the Input Map of the assembly line to convert the TIMESTAMP String to a Data. See below.
Please note:
This code is not there by default. The default behavior is to treat the variable as the data type that is returned from the connector (in this case a String). If you need to convert the String to a Date, you would have to manually add that snippet of code in the Input Map.

Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21968086