Hi.
I'm trying to add a horizontal line, to mi bar char with the value obtain with an sql query.
1. I create a sql over sqlJndi with the name thershold_software.
2. Then a Simple Parameter: Name: threshold_sw.
3. And a Query Component:
Name: threshold_QC
Result_Var: threshold_sw
Datasource: thershold_software
Post Fech:
function f2 (data){
Dashboards.fireChange('${p:threshold_sw}', data.resultset);
}
4. In my bar chart i added on extension points:
Arg : plot_add
Value:
function() {
var threshold = Dashboards.getParameterValue('${p:threshold_sw}');
alert (threshold);
return new pv.Rule()
.bottom(threshold,5)
.height(null)
.left(0)
.right(0)
.strokeStyle('red');
}
The alert show not value, like te parameter is empty.
If i add a manual value to the single parameter it shows that value.
But i want the value obtain of the query.
What i'm doing wrong??
Thanks