SpagoBI - Lines
Parameters Description Default
paramWidth Set table width 500
paramHeight Set table height 300
xColName Name of the label that identifies a special column from the dataset. This will be the first column on the left and it will be possible to assign it a different background color xLabel
refreshRate Set the delay between two consecutive request to server 15000
timeStartValue Set the star time (hh:mm) label on the X axis. If not specified it will be set equal to the current time undefined
timeStopValue Set the stop time (hh:mm) label on the X axis. If not specified it will be set equal to "startTimeValue + stepNumValue x timeGridStepValue" undefined
stepNumValue Set the number of data displayed before the table refresh. This parameter set the step of each line, with respect to the x axis 10
timeGridStepValue Set the grid x step (hh:mm) 0:01
xLabelValue Set the label for the x axis Time
yLabelValue Set the label for the x axis
minYValue Set the min value for the y axis 0
maxYValue Set the max value for the y axis 200
stepYValue Set the grid step on the y axis 25
line1Color Set the color for the line 1 0xf92525
line2Color Set the color for the line 2 0x17e512
line3Color Set the color for the line 3 0xbe4ce3
line4Color Set the color for the line 4 0x5420ff
line5Color Set the color for the line 5 0xf442ff
line6Color Set the color for the line 6 0xfb7819
line7Color Set the color for the line 7 0x19fbee
line8Color Set the color for the line 8 0xe570ad
line9Color Set the color for the line 9 0xfd0c23
line10Color Set the color for the line 10 0x4618de
How to feed this movie
Using a script The script must return a String like: "<rows><row {line 1 label}='{numeric value}' {line 2 label}='{numeric value}' ... /></rows>".
Script example:
StringBuffer buf = new StringBuffer();
buf.append('<rows>');
float line1 =
... [numeric value calculation]
float line2 =
... [numeric value calculation]
float line3 =
... [numeric value calculation]
buf.append('<row Efficiency=\'');
buf.append(line1);
buf.append('\' Budget_satisfation=\'');
buf.append(line2);
buf.append('\' Emp_occupation_degree=\'');
buf.append(line3);
buf.append('\' />');
buf.append('</rows>')
return buf;
Using a query The query must return one row. For each row attribute, the key is considered as the line label, the value (that must be a numeric value) is considered as the current line height:
select {something representing the line 1 value}, {something representing the line 2 value} ... from {table} ....
Query example:
select store_efficiency as Efficiency, store_budget_satisfation as Budget_satisfation, store_emp_occupation_degree as Emp_occupation_degree from stores where store_id = 3