AnsweredAssumed Answered

Barchart - empty space for missing time series data point

Question asked by Glupe Registracije on Mar 9, 2018
Latest reply on Mar 9, 2018 by Glupe Registracije

Hi,

 

if I have several data points, something like this (please note that there are no data point for 20-th and 25-th minute):

 

2017-12-31 00:00:00  1

2017-12-31 00:05:00  2

2017-12-31 00:10:00  3

2017-12-31 00:15:00  4

2017-12-31 00:30:00  5

 

When I do the bar chart for these values with time on x axis and value (1-5) on y axis, barchart is drown well as five bars, but there is no space before 4-th and 5-th bars.

 

I would have expected that I will have four successive bars with values 1-4, than empty space of size two bars (for 20-th and 25-th missing data point), and than last data point with its value of 5.

 

For now we are using sql for inserting missing data points in datasource. In this case we are inserting the following two missing data points:

2017-12-31 00:20:00  0

2017-12-31 00:25:00  0

 

in order to get data source like this:

 

2017-12-31 00:00:00  1

2017-12-31 00:05:00  2

2017-12-31 00:10:00  3

2017-12-31 00:15:00  4

2017-12-31 00:20:00  0

2017-12-31 00:25:00  0

2017-12-31 00:30:00  5

 

and to be able finally to have a hole between 15-th and 30-th minute.

 

Can I somehow tell pentaho chart to use time scale as x axis, and to plot only values that exist in the datasource and leave empty space for any missing value?

 

Regards.

Outcomes