|
Show clickable data charts |
Posted by seafree on Jan-06-2015 23:21 |
|
Hi Peter, I showed a pie chart with 3 values:
- Nombre del Sector
- Costo
- Indisponibilidad
I clicked in a sector and show:
- Nombre del Sector
- Indisponibilidad
- Porcentaje de la indisponibilidad
BUT don't show the Costo, can you help me please, the code is:
<ul>
<li><b>Sistema</b> : @{[$query->param("label")]}</li>
<li><b>Indisponibilidad</b> : @{[$query->param("value")]}</li>
<li><b>Porcentaje</b> : @{[$query->param("percent")]}%</li>
<li><b>Costo</b> : @{[$query->param("\\$value|0}")]}</li>
</ul>
Thanks. |
Re: Show clickable data charts |
Posted by seafree on Jan-07-2015 00:29 |
|
I change the sentence:
<li><b>Costo</b> : @{[$query->param("\\$field0}")]}</li>
Because is a ExtraField, but don't show the cost value, can you help me please.
I reviewed the code and when I clicked the chart it send data values:
sector
label
value and
percent
Then I added the Extrafield;
my $imageMap = $c ->getHTMLImageMap("piestub.pl","","title='{dataSetName}@{xLabel}:{field0}'");
But the parameters are the same:
sector
label
value and
percent
What can I do? |
Re: Show clickable data charts |
Posted by Peter Kwan on Jan-07-2015 01:03 |
|
Hi,
You can use something like:
my $imageMap = $c->getHTMLImageMap("piestub.pl",
"label={label}&value={value}&percent={percent}&aaa={field0}",
"title='{dataSetName}@{xLabel}:{field0}'");
Then you can use:
<ul>
<li><b>Sistema</b> : @{[$query->param("label")]}</li>
<li><b>Indisponibilidad</b> : @{[$query->param("value")]}</li>
<li><b>Porcentaje</b> : @{[$query->param("percent")]}%</li>
<li><b>Costo</b> : @{[$query->param("aaa")]}</li>
</ul>
Hope this can help.
Regards
Peter Kwan |
Re: Show clickable data charts |
Posted by seafree on Jan-07-2015 01:12 |
|
Thanks a lot Peter |
Re: Show clickable data charts |
Posted by seafree on Jan-07-2015 03:38 |
|
Hi Peter, how can I add another variable?
my $imageMap = $c->getHTMLImageMap("piestub.pl",
"label={label}&value={value}&percent={percent}&aaa={field0}",
"title='{dataSetName}@{xLabel}:{field0}'");
The variable will be $sql, how can add it to $imageMap and how can I get it?
Thanks |
Re: Show clickable data charts |
Posted by Peter Kwan on Jan-08-2015 01:18 |
|
Hi seafree,
I assume the "variable" $sql you are referring to is different from every sector. It means the
$sql is a reference to an array reference text, with each text applied to one sector. In this
case, you can add the $sql as an extra field, the same way the Costo is added. It is like:
$c->addExtraField($refereceToAnArrayOfCosto);
$c->addExtraField($refereceToAnArrayOfSql);
my $imageMap = $c->getHTMLImageMap("piestub.pl",
"label={label}&value={value}&percent={percent}&aaa={field0}"&bbb={field1}",
"title='{dataSetName}@{xLabel}:{field0}'");
Now the query parameter aaa will be the Costo, and bbb will be the sql.
Hope this can help.
Regards
Peter Kwan |
Re: Show clickable data charts |
Posted by seafree on Jan-09-2015 01:46 |
|
Thanks Peter |
|