SpagoBI - Columns | ||
![]() |
||
Parameters | Description | Default |
paramWidth | Set table width | 500 |
paramHeight | Set table height | 500 |
xColName | Name of the label that identifies the attribute of the dataset containing data labels | xLabel |
valsColName | Name of the label that identifies the attribute of the dataset containing the data values | line1 |
dataurl | Specify the URL of the servlet that returns data | http://localhost:8080/openlaszlo/OpenLaszloEngineDash |
minYValue | Set the min value for the y axis | 0 |
maxYValue | Set the max value for the y axis | 200 |
yStepOnGrid | Set the step value for the y axis | 20 |
column1Color | Set the color for the column 1 | 0xf92525 |
column2Color | Set the color for the column 2 | 0x17e512 |
column3Color | Set the color for the column 3 | 0xbe4ce3 |
column4Color | Set the color for the column 4 | 0x5420ff |
column5Color | Set the color for the column 5 | 0xf442ff |
column6Color | Set the color for the column 6 | 0xfb7819 |
column7Color | Set the color for the column 7 | 0x0f5004 |
column8Color | Set the color for the column 8 | 0x19fbee |
column9Color | Set the color for the column 9 | 0x9cd000 |
column10Color | Set the color for the column 10 | 0xfddd09 |
How to feed this movie | |
---|---|
Using a script |
The script must return a String like: "<rows><row {xColName parameter}='{literal value}' {valsColName parameter}='{numeric value}'/> ... </rows>". Script example (assuming that the xColName parameter is "name" and valsColName parameter is "value"): StringBuffer buf = new StringBuffer(); buf.append('<rows>'); buf.append('<row name=\'Store1\' '); float col1 = .... [numeric value calculation]; buf.append('value=\''); buf.append(col1); buf.append('\' />'); buf.append('<row name=\'Store2\' '); float col2 = .... [numeric value calculation]; buf.append('value=\''); buf.append(col2); buf.append('\' />'); buf.append('<row name=\'Store3\' '); float col3 = .... [numeric value calculation]; buf.append('value=\''); buf.append(col3); buf.append('\' />'); buf.append('</rows>'); return buf; |
Using a query |
The query can return many rows. Each row must have an attribute with the key represented by the xColName parameter and with a literal value (this will be the label of the dataset) and another attribute with the key represented by the valsColName parameter and with a numeric value (this will be the clomun height): select {something representing the column label} as {xColName parameter}, {something representing the column value} as {valsColName parameter} from {table} .... Query example (assuming that the xColName parameter is "name" and valsColName parameter is "value"): select store_name as name, store_earning as value from stores where store_name in ('Store1','Store2','Store3') |