mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Added support for percentage display in pie chart
This commit is contained in:
parent
cefdd9d6f1
commit
24cd80089b
@ -109,7 +109,7 @@ if ( isset($_GET['showpercent']) )
|
|||||||
$content['showpercent'] = 0;
|
$content['showpercent'] = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$content['maxrecords'] = 10;
|
$content['showpercent'] = 0;
|
||||||
// ---
|
// ---
|
||||||
|
|
||||||
// --- BEGIN CREATE TITLE
|
// --- BEGIN CREATE TITLE
|
||||||
@ -200,10 +200,16 @@ if ( !$content['error_occured'] )
|
|||||||
// $p1->SetCSIMTargets($targ,$alts);
|
// $p1->SetCSIMTargets($targ,$alts);
|
||||||
|
|
||||||
// Set label format
|
// Set label format
|
||||||
$p1->SetLabelType(0);
|
if ( $content['showpercent'] == 1 )
|
||||||
$p1->value->SetFormat("%d%%");
|
{
|
||||||
// $p1->SetLabelType(1);
|
$p1->SetLabelType(0);
|
||||||
// $p1->value->SetFormat("%d");
|
$p1->value->SetFormat("%d%%");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$p1->SetLabelType(1);
|
||||||
|
$p1->value->SetFormat("%d");
|
||||||
|
}
|
||||||
|
|
||||||
// Set label properties
|
// Set label properties
|
||||||
$p1->SetLabelPos(1.0);
|
$p1->SetLabelPos(1.0);
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<td class="line1"> {showpercent_display}</td>
|
<td class="line1"> {showpercent_display}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td class="{cssclass}" colspan="2">
|
<tr><td class="{cssclass}" colspan="2">
|
||||||
<img src="{BASEPATH}chartgenerator.php?type={chart_type}&byfield={chart_field}&width={chart_width}&maxrecords={maxrecords}" width="{chart_width}" height="{chart_width}">
|
<img src="{BASEPATH}chartgenerator.php?type={chart_type}&byfield={chart_field}&width={chart_width}&maxrecords={maxrecords}&showpercent={showpercent}" width="{chart_width}" height="{chart_width}">
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user