diff options
| author | lsces <lester@lsces.co.uk> | 2025-08-27 17:26:04 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2025-08-27 17:26:04 +0100 |
| commit | a57c635d8319f914f82eb5937eedd79aabba46e8 (patch) | |
| tree | 9a527e565fa932705d8360f620d3bc0267a8a949 /item_chart.php | |
| parent | e4091e0a8778d65dbf0a8252c362aea9644fbf8c (diff) | |
| download | stats-a57c635d8319f914f82eb5937eedd79aabba46e8.tar.gz stats-a57c635d8319f914f82eb5937eedd79aabba46e8.tar.bz2 stats-a57c635d8319f914f82eb5937eedd79aabba46e8.zip | |
Code updated to PHP8.4 and namespace
Diffstat (limited to 'item_chart.php')
| -rw-r--r-- | item_chart.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/item_chart.php b/item_chart.php index 3703e2a..454ccc9 100644 --- a/item_chart.php +++ b/item_chart.php @@ -16,7 +16,7 @@ /** * required setup */ -require_once( '../kernel/includes/setup_inc.php' ); +require_once '../kernel/includes/setup_inc.php'; include_once( STATS_PKG_PATH . "Statistics.php" ); include_once( UTIL_PKG_INCLUDE_PATH . "phplot.php" ); global $gBitSystem; @@ -26,11 +26,11 @@ $gBitSystem->verifyPermission( 'p_stats_view' ); $stats = new Statistics(); -$data = $stats->getContentTypeChartData( !empty( $_REQUEST['content_type_guid'] ) ? $_REQUEST['content_type_guid'] : NULL ); +$data = $stats->getContentTypeChartData( !empty( $_REQUEST['content_type_guid'] ) ? $_REQUEST['content_type_guid'] : null ); $chart_type = !empty( $_REQUEST['chart_type'] ) ? $_REQUEST['chart_type'] : 'bars'; // initialise phplot and insert data -$graph =& new PHPlot( 600, 400 * ( count( $data['data'] ) ) ); +$graph = new PHPlot( 600, 400 * ( count( $data['data'] ) ) ); $graph->SetPrintImage(0); $graph->SetPlotType( $chart_type ); $graph->SetXTickPos( 'none' ); @@ -41,7 +41,7 @@ $graph->SetXLabel( tra( 'Title' ) ); $i = 0; foreach( $data['data'] as $guid => $info ) { $graph->SetDataValues( $info ); - $graph->SetDrawXDataLabels( TRUE ); + $graph->SetDrawXDataLabels( true ); $graph->SetXLabelAngle( ( count( $info ) > 5 ) ? 90 : 0 ); $graph->SetNewPlotAreaPixels( 75, 30 + ( $i * 390 ), 580, 370 + ( $i * 390 ) ); if( !empty( $_REQUEST['content_type_guid'] ) ) { |
