Time Series Chart - Visualizing Hrs/Min/Sec
Download: Time Series
Introduction
The OOTB charts in Sisense limit the date roll-up granularity to days. This imposes limitations when working with granular times series data.
This plugin facilitates roll-up of dates up to the millisecond level. It also supports a split chart view which splits each measure into its own plot area.
Note: This plugin is an enhancement of the Highcharts Zoomable Line Chart widget.
http://www.highcharts.com/demo/line-time-series
Instructions
Download the plugin folder (TimeSeriesChart) and place it in your Sisense plugins folder. The Widget displays as Time Series Chart in the widget selection list.
C:\Program Files\Sisense\PrismWeb\plugins
If you are using version 7.2 and higher unzip the contents into your C:\Program Files\Sisense\app\plugins\ folder.
Data Preparation
This plugin accepts a date as a Unix Time Stamp - The number of milliseconds after Jan 01, 1970. You need to add an expression field in your elastic cube to convert your date field to a Unix Time Stamp.
Note: Set the column type to big-int.
(DayDiff([DateField], CreateDate(1970,1,1)) * 86400000) +
(GetHour([DateField]) * 3600000) + (GetMinute([DateField]) * 60000) + (GetSecond([DateField]) * 1000)
Options
Label Format - Sets the format of the markers on the X Axis.
Note: The Label Format setting will not roll-up the date. Use the formula to set the level of granularity. e.g. If you wish to roll-up the dates to the hour, then eliminate the minute and second portion of the formula.
Split Chart - Splits the chart into multiple plot areas, one for each measure in the Value panel.
Theme - Sets the color scheme of the chart.
UPDATES
May 30, 2017 - Added some additional datetime format options, added support for datetime datatype as x-axis, fixed issue with x-axis label formatting
Oct 20, 2018 - Removed value labels on plot area, changed grid lines to dash, improved sizing for split chart view
-
Hi Jim
#1
The tool-tips should now respect the format set on the measures. Please check.
#2
I have uploaded the plugin under a new name. TimeSeriesChart. So as not to override the original zoomable line chart plugin.
#3
Rendering as a step line seems to be the culprit when it comes to poor performance. I set the default to render as a regular line chart.
-
Hi Jim
What do you mean by lines ? The horizontal grid lines of the plot area ?
I have tested this on a mac book air 4GB RAM on chrome and safari 6.2.8 and they both render fine.
Remember this is an enhancement of the highcharts zoomable line chart. I have not implemented the complete rendering !!
N/W speed could make a big difference when potting a large number of points.
-
Jay,
By lines, I mean the plot lines. On Chrome on the Mac (OSX Sierra, latest version of Chrome), they only render in the widget design screen. Once I hit Apply to return to the dashboard, they no longer render. They render fine on Safari, but very slow as previously described.
I'd be surprised if network speed was the issue on the Mac. Typically have 18 mb/sec download speeds. I'm available for a web conference to demonstrate on Thursday if you want tot take a look.
Regards, Jim
-
I'm attempting some mild modifications to the widget, with the goal of enabling a few specific Highcharts features, but am experiencing mixed success.
I'd like to enable the following:
- Crosshairs (Not working/visible)
- Navigator (Works, but doesn't display selection handles or allow restyling)
- Range Selector (Not working/visible)
Widget Image, showing the navigator pane
I've added the following code to the Widget.js within the 'var options={}' section of code:
//Navigator Stuff
navigator: {
enabled: true, outlineColor: '#999999', outlineWidth: 2,
handles: {
backgroundColor: '#f2f2f2', borderColor: '#999999'
}
},
//Range Selector
rangeSelector: {
selected: 4, inputEnabled: false,
buttons: [{
type: 'millisecond',
count: 15000,
text: '15s'
}, {
type: 'millisecond',
count: 60000,
text: '1min'
}, {
type: 'millisecond',
count: 300000,
text: '5min'
}, {
type: 'millisecond',
text: 'All'
}]
},
//End Navigator StuffAny ideas on what I might be missing?
Thanks,
Larry
-
Hi Jay,
I am trying to use this plug-in for my time series data.
Created a custom field with following column column expression.
(DayDiff([END_TIMESTAMP], CreateDate(1970,1,1)) * 86400000) + (GetHour([END_TIMESTAMP]) * 3600000) +
(GetMinute([END_TIMESTAMP]) * 60000) + (GetSecond([END_TIMESTAMP]) * 1000)In this case, [END_TIMESTAMP] is the field with Date-Time data type.
Column Expression is showing no errors (Parsed successfully) . But preview result is showing the following error message.
Value was either too large or too small for an Int32. Couldn't store <1496276100000> in UNIX_TIMESTAMP column. Expected type is Int32
Can you please help me in this.
-
Hello Jay,
I am able to trend the time series data using he unix timestamp field. But the label format is showing incorrect month name.
Can you please check the below screen captures which show Aug, 14, 2017 for Mon, dd, yyyy format and 07/14/2017 for MM/dd/yyyy format.
The actual data is for 14th July.
Regards,
Guru
-
I was getting this error eventhough i set the field up as a bigint
Value was either too large or too small for an Int32. Couldn't store <1496276100000> in UNIX_TIMESTAMP column. Expected type is Int32
The fix was to Convert the result of the formula to a bigint using the ToBigInt function like so
ToBigInt((DayDiff([DateField], CreateDate(1970,1,1)) * 86400000) +
(GetHour([DateField]) * 3600000) + (GetMinute([DateField]) * 60000) + (GetSecond([DateField]) * 1000))
-
Hi Jay,
I've a very strange issue. I've few different series I want to plot on the chart, and I select what to plot by a filter on dashboard level. When I select some of those series, the chart does not display full time range. I have data from 24-11-2017 until today and chart cuts it at around 9th of January. When I display it in different visuals it shows properly full time range. Any hints what could be wrong with such behavior? Thanks in advance!
Regards,
Micahł
Please sign in to leave a comment.
Comments
16 comments