mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
ThirdParty: Updated jpgraph to 4.3.1 (2020-04-24)
This commit is contained in:
parent
9525d4f550
commit
546d932cc7
@ -238,25 +238,25 @@ if ( !$content['error_occured'] )
|
|||||||
|
|
||||||
// Setup the tab title
|
// Setup the tab title
|
||||||
$graph->tabtitle->Set( GetAndReplaceLangStr($content['LN_STATS_CHARTTITLE'], $content['maxrecords'], $fields[$content['chart_field']]['FieldCaption']) );
|
$graph->tabtitle->Set( GetAndReplaceLangStr($content['LN_STATS_CHARTTITLE'], $content['maxrecords'], $fields[$content['chart_field']]['FieldCaption']) );
|
||||||
$graph->tabtitle->SetFont(FF_VERA,FS_BOLD,9);
|
$graph->tabtitle->SetFont(FF_DV_SANSSERIF,FS_BOLD,9);
|
||||||
$graph->tabtitle->SetPos('left');
|
$graph->tabtitle->SetPos('left');
|
||||||
|
|
||||||
// Set Graph footer
|
// Set Graph footer
|
||||||
$graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
$graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
||||||
$graph->footer->left->SetFont( FF_VERA, FS_NORMAL, 7);
|
$graph->footer->left->SetFont( FF_DV_SANSSERIF, FS_NORMAL, 7);
|
||||||
// $graph->footer->right->Set ( GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
// $graph->footer->right->Set ( GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
||||||
// $graph->footer->right->SetFont( FF_VERA, FS_NORMAL, 8);
|
// $graph->footer->right->SetFont( FF_DV_SANSSERIF, FS_NORMAL, 8);
|
||||||
// $graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
// $graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
||||||
// $graph->footer->left->SetFont( FF_VERA, FS_NORMAL, 8);
|
// $graph->footer->left->SetFont( FF_DV_SANSSERIF, FS_NORMAL, 8);
|
||||||
// $graph->footer->right->SetColor("darkred");
|
// $graph->footer->right->SetColor("darkred");
|
||||||
|
|
||||||
// Show 0 label on Y-axis (default is not to show)
|
// Show 0 label on Y-axis (default is not to show)
|
||||||
$graph->yscale->ticks->SupressZeroLabel(false);
|
$graph->yscale->ticks->SupressZeroLabel(false);
|
||||||
|
|
||||||
// Set Fonts for graph!
|
// Set Fonts for graph!
|
||||||
$graph->xaxis->SetFont(FF_VERA,FS_NORMAL,8);
|
$graph->xaxis->SetFont(FF_DV_SANSSERIF,FS_NORMAL,8);
|
||||||
$graph->yaxis->SetFont(FF_VERA,FS_NORMAL,8);
|
$graph->yaxis->SetFont(FF_DV_SANSSERIF,FS_NORMAL,8);
|
||||||
$graph->legend->SetFont(FF_VERA,FS_NORMAL,8);
|
$graph->legend->SetFont(FF_DV_SANSSERIF,FS_NORMAL,8);
|
||||||
|
|
||||||
// Create
|
// Create
|
||||||
$p1 = new PiePlot3D($YchartData);
|
$p1 = new PiePlot3D($YchartData);
|
||||||
@ -282,7 +282,7 @@ if ( !$content['error_occured'] )
|
|||||||
// Set label properties
|
// Set label properties
|
||||||
$p1->SetLabelPos(1.0);
|
$p1->SetLabelPos(1.0);
|
||||||
$p1->SetSliceColors(array('#FFF584','#CBFF84','#FF6B9E','#FF9584','#EAFF84','#7BFF51','#51FFA6','#51FF52','#6BCFFF','#5170FF','#519CFF','#EAE3AD','#FFF184','#8584FF','#E698FF','#C384FF','#FF84EC','#FF98A3','#E5C285','#FFDA98' ));
|
$p1->SetSliceColors(array('#FFF584','#CBFF84','#FF6B9E','#FF9584','#EAFF84','#7BFF51','#51FFA6','#51FF52','#6BCFFF','#5170FF','#519CFF','#EAE3AD','#FFF184','#8584FF','#E698FF','#C384FF','#FF84EC','#FF98A3','#E5C285','#FFDA98' ));
|
||||||
$p1->value->SetFont(FF_VERA, FS_NORMAL, 8);
|
$p1->value->SetFont(FF_DV_SANSSERIF, FS_NORMAL, 8);
|
||||||
$p1->value->SetColor("black");
|
$p1->value->SetColor("black");
|
||||||
|
|
||||||
// Adjust other Pie Properties
|
// Adjust other Pie Properties
|
||||||
@ -307,7 +307,7 @@ if ( !$content['error_occured'] )
|
|||||||
$graph->img->SetAlphaBlending(true);
|
$graph->img->SetAlphaBlending(true);
|
||||||
|
|
||||||
// Setup X-AXIS
|
// Setup X-AXIS
|
||||||
// $graph->xaxis->SetFont(FF_VERA,FS_NORMAL,10);
|
// $graph->xaxis->SetFont(FF_DV_SANSSERIF,FS_NORMAL,10);
|
||||||
$graph->xaxis->SetTickLabels($XchartData);
|
$graph->xaxis->SetTickLabels($XchartData);
|
||||||
|
|
||||||
if ( count($XchartData) > 5 )
|
if ( count($XchartData) > 5 )
|
||||||
@ -326,17 +326,17 @@ if ( !$content['error_occured'] )
|
|||||||
$graph->yscale->ticks->SupressZeroLabel(false);
|
$graph->yscale->ticks->SupressZeroLabel(false);
|
||||||
|
|
||||||
// Set Fonts for graph!
|
// Set Fonts for graph!
|
||||||
$graph->xaxis->SetFont(FF_VERA,FS_NORMAL,7);
|
$graph->xaxis->SetFont(FF_DV_SANSSERIF,FS_NORMAL,7);
|
||||||
$graph->yaxis->SetFont(FF_VERA,FS_NORMAL,8);
|
$graph->yaxis->SetFont(FF_DV_SANSSERIF,FS_NORMAL,8);
|
||||||
|
|
||||||
// Setup the tab title
|
// Setup the tab title
|
||||||
$graph->tabtitle->Set( GetAndReplaceLangStr($content['LN_STATS_CHARTTITLE'], $content['maxrecords'], $fields[$content['chart_field']]['FieldCaption']) );
|
$graph->tabtitle->Set( GetAndReplaceLangStr($content['LN_STATS_CHARTTITLE'], $content['maxrecords'], $fields[$content['chart_field']]['FieldCaption']) );
|
||||||
$graph->tabtitle->SetFont(FF_VERA,FS_BOLD,9);
|
$graph->tabtitle->SetFont(FF_DV_SANSSERIF,FS_BOLD,9);
|
||||||
$graph->tabtitle->SetPos('left');
|
$graph->tabtitle->SetPos('left');
|
||||||
|
|
||||||
// Set Graph footer
|
// Set Graph footer
|
||||||
$graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
$graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
||||||
$graph->footer->left->SetFont( FF_VERA, FS_NORMAL, 7);
|
$graph->footer->left->SetFont( FF_DV_SANSSERIF, FS_NORMAL, 7);
|
||||||
|
|
||||||
// Setup the X and Y grid
|
// Setup the X and Y grid
|
||||||
$graph->ygrid->SetFill(true,'#DDDDDD@0.5','#BBBBBB@0.5');
|
$graph->ygrid->SetFill(true,'#DDDDDD@0.5','#BBBBBB@0.5');
|
||||||
@ -358,7 +358,7 @@ if ( !$content['error_occured'] )
|
|||||||
|
|
||||||
// Display value in bars
|
// Display value in bars
|
||||||
$bplot->value->Show();
|
$bplot->value->Show();
|
||||||
$bplot->value->SetFont(FF_VERA,FS_NORMAL,8);
|
$bplot->value->SetFont(FF_DV_SANSSERIF,FS_NORMAL,8);
|
||||||
$bplot->value->SetFormat('%d');
|
$bplot->value->SetFormat('%d');
|
||||||
|
|
||||||
// Add links
|
// Add links
|
||||||
@ -392,6 +392,12 @@ if ( !$content['error_occured'] )
|
|||||||
$graph->SetMarginColor('white');
|
$graph->SetMarginColor('white');
|
||||||
$graph->SetBox(); // Box around plotarea
|
$graph->SetBox(); // Box around plotarea
|
||||||
|
|
||||||
|
$graph->xgrid->Show();
|
||||||
|
$graph->xgrid->SetLineStyle("solid");
|
||||||
|
$graph->xaxis->SetTickLabels(array('A','B','C','D'));
|
||||||
|
$graph->xgrid->SetColor('#E3E3E3');
|
||||||
|
|
||||||
|
|
||||||
// Setup X-AXIS
|
// Setup X-AXIS
|
||||||
$graph->xaxis->SetTickLabels($XchartData);
|
$graph->xaxis->SetTickLabels($XchartData);
|
||||||
$graph->xaxis->SetLabelAngle(0);
|
$graph->xaxis->SetLabelAngle(0);
|
||||||
@ -413,18 +419,18 @@ if ( !$content['error_occured'] )
|
|||||||
$graph->yscale->ticks->SupressZeroLabel(false);
|
$graph->yscale->ticks->SupressZeroLabel(false);
|
||||||
|
|
||||||
// Set Fonts for graph!
|
// Set Fonts for graph!
|
||||||
$graph->xaxis->SetFont(FF_VERA,FS_NORMAL,7);
|
$graph->xaxis->SetFont(FF_DV_SANSSERIF,FS_NORMAL,7);
|
||||||
$graph->yaxis->SetFont(FF_VERA,FS_NORMAL,8);
|
$graph->yaxis->SetFont(FF_DV_SANSSERIF,FS_NORMAL,8);
|
||||||
|
|
||||||
// Setup the tab title
|
// Setup the tab title
|
||||||
$graph->tabtitle->Set( GetAndReplaceLangStr($content['LN_STATS_CHARTTITLE'], $content['maxrecords'], $fields[$content['chart_field']]['FieldCaption']) );
|
$graph->tabtitle->Set( GetAndReplaceLangStr($content['LN_STATS_CHARTTITLE'], $content['maxrecords'], $fields[$content['chart_field']]['FieldCaption']) );
|
||||||
$graph->tabtitle->SetFont(FF_VERA,FS_BOLD,9);
|
$graph->tabtitle->SetFont(FF_DV_SANSSERIF,FS_BOLD,9);
|
||||||
$graph->tabtitle->SetPos('right');
|
$graph->tabtitle->SetPos('right');
|
||||||
$graph->tabtitle->SetTabAlign('right');
|
$graph->tabtitle->SetTabAlign('right');
|
||||||
|
|
||||||
// Set Graph footer
|
// Set Graph footer
|
||||||
$graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
$graph->footer->left->Set ("LogAnalyzer v" . $content['BUILDNUMBER'] . "\n" . GetAndReplaceLangStr($content['LN_STATS_GENERATEDAT'], date("Y-m-d")) );
|
||||||
$graph->footer->left->SetFont( FF_VERA, FS_NORMAL, 7);
|
$graph->footer->left->SetFont( FF_DV_SANSSERIF, FS_NORMAL, 7);
|
||||||
|
|
||||||
// Setup the X and Y grid
|
// Setup the X and Y grid
|
||||||
$graph->ygrid->SetFill(true,'#DDDDDD@0.5','#BBBBBB@0.5');
|
$graph->ygrid->SetFill(true,'#DDDDDD@0.5','#BBBBBB@0.5');
|
||||||
@ -446,7 +452,7 @@ if ( !$content['error_occured'] )
|
|||||||
|
|
||||||
// Display value in bars
|
// Display value in bars
|
||||||
$bplot->value->Show();
|
$bplot->value->Show();
|
||||||
$bplot->value->SetFont(FF_VERA,FS_NORMAL, 8);
|
$bplot->value->SetFont(FF_DV_SANSSERIF,FS_NORMAL, 8);
|
||||||
$bplot->value->SetFormat('%d');
|
$bplot->value->SetFormat('%d');
|
||||||
|
|
||||||
// Add links
|
// Add links
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
README FOR JPGRAPH 4.0.1
|
README FOR JPGRAPH 4.3.1
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
This package contains the JpGraph PHP library version 4.0.1
|
This package contains the JpGraph PHP library version 4.3.1
|
||||||
|
|
||||||
The library is Copyright (C) 2000-2010 Asial Corporatoin and
|
The library is Copyright (C) 2000-2010 Asial Corporatoin and
|
||||||
released under dual license QPL 1.0 for open source and educational
|
released under dual license QPL 1.0 for open source and educational
|
||||||
@ -11,9 +11,6 @@ Please see full license details at
|
|||||||
http://jpgraph.net/pro/
|
http://jpgraph.net/pro/
|
||||||
http://jpgraph.net/download/
|
http://jpgraph.net/download/
|
||||||
|
|
||||||
* --------------------------------------------------------------------
|
|
||||||
* PHP4 IS NOT SUPPORTED IN 3.x or 4.x SERIES
|
|
||||||
* --------------------------------------------------------------------
|
|
||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
-------------
|
-------------
|
||||||
|
237
src/classes/jpgraph/flag_mapping
Normal file
237
src/classes/jpgraph/flag_mapping
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
class JpCountryFlags {
|
||||||
|
|
||||||
|
$iCountryFlags = array(
|
||||||
|
'Afghanistan' => 'afgh.gif',
|
||||||
|
'Republic of Angola' => 'agla.gif',
|
||||||
|
'Republic of Albania' => 'alba.gif',
|
||||||
|
'Alderney' => 'alde.gif',
|
||||||
|
'Democratic and Popular Republic of Algeria' => 'alge.gif',
|
||||||
|
'Territory of American Samoa' => 'amsa.gif',
|
||||||
|
'Principality of Andorra' => 'andr.gif',
|
||||||
|
'British Overseas Territory of Anguilla' => 'angu.gif',
|
||||||
|
'Antarctica' => 'anta.gif',
|
||||||
|
'Argentine Republic' => 'arge.gif',
|
||||||
|
'League of Arab States' => 'arle.gif',
|
||||||
|
'Republic of Armenia' => 'arme.gif',
|
||||||
|
'Aruba' => 'arub.gif',
|
||||||
|
'Commonwealth of Australia' => 'astl.gif',
|
||||||
|
'Republic of Austria' => 'aust.gif',
|
||||||
|
'Azerbaijani Republic' => 'azer.gif',
|
||||||
|
'British Antarctic Territory' => 'bant.gif',
|
||||||
|
'Kingdom of Belgium' => 'belg.gif',
|
||||||
|
'British Overseas Territory of Bermuda' => 'berm.gif',
|
||||||
|
'Commonwealth of the Bahamas' => 'bhms.gif',
|
||||||
|
'Kingdom of Bahrain' => 'bhrn.gif',
|
||||||
|
'Republic of Belarus' => 'blru.gif',
|
||||||
|
'Republic of Bolivia' => 'blva.gif',
|
||||||
|
'Belize' => 'blze.gif',
|
||||||
|
'Republic of Benin' => 'bnin.gif',
|
||||||
|
'Republic of Botswana' => 'bots.gif',
|
||||||
|
'Federative Republic of Brazil' => 'braz.gif',
|
||||||
|
'Barbados' => 'brbd.gif',
|
||||||
|
'British Indian Ocean Territory' => 'brin.gif',
|
||||||
|
'Brunei Darussalam' => 'brun.gif',
|
||||||
|
'Republic of Burkina' => 'bufa.gif',
|
||||||
|
'Republic of Bulgaria' => 'bulg.gif',
|
||||||
|
'Republic of Burundi' => 'buru.gif',
|
||||||
|
'Overseas Territory of the British Virgin Islands' => 'bvis.gif',
|
||||||
|
'Central African Republic' => 'cafr.gif',
|
||||||
|
'Kingdom of Cambodia' => 'camb.gif',
|
||||||
|
'Republic of Cameroon' => 'came.gif',
|
||||||
|
'Dominion of Canada' => 'cana.gif',
|
||||||
|
'Caribbean Community' => 'cari.gif',
|
||||||
|
'Republic of Cape Verde' => 'cave.gif',
|
||||||
|
'Republic of Chad' => 'chad.gif',
|
||||||
|
'Republic of Chile' => 'chil.gif',
|
||||||
|
'Territory of Christmas Island' => 'chms.gif',
|
||||||
|
'Commonwealth of Independent States' => 'cins.gif',
|
||||||
|
'Cook Islands' => 'ckis.gif',
|
||||||
|
'Republic of Colombia' => 'clmb.gif',
|
||||||
|
'Territory of Cocos Islands' => 'cois.gif',
|
||||||
|
'Commonwealth' => 'comn.gif',
|
||||||
|
'Union of the Comoros' => 'como.gif',
|
||||||
|
'Republic of the Congo' => 'cong.gif',
|
||||||
|
'Republic of Costa Rica' => 'corc.gif',
|
||||||
|
'Republic of Croatia' => 'croa.gif',
|
||||||
|
'Republic of Cuba' => 'cuba.gif',
|
||||||
|
'British Overseas Territory of the Cayman Islands' => 'cyis.gif',
|
||||||
|
'Republic of Cyprus' => 'cypr.gif',
|
||||||
|
'The Czech Republic' => 'czec.gif',
|
||||||
|
'Kingdom of Denmark' => 'denm.gif',
|
||||||
|
'Republic of Djibouti' => 'djib.gif',
|
||||||
|
'Commonwealth of Dominica' => 'domn.gif',
|
||||||
|
'Dominican Republic' => 'dore.gif',
|
||||||
|
'Republic of Ecuador' => 'ecua.gif',
|
||||||
|
'Arab Republic of Egypt' => 'egyp.gif',
|
||||||
|
'Republic of El Salvador' => 'elsa.gif',
|
||||||
|
'England' => 'engl.gif',
|
||||||
|
'Republic of Equatorial Guinea' => 'eqgu.gif',
|
||||||
|
'State of Eritrea' => 'erit.gif',
|
||||||
|
'Republic of Estonia' => 'estn.gif',
|
||||||
|
'Ethiopia' => 'ethp.gif',
|
||||||
|
'European Union' => 'euun.gif',
|
||||||
|
'British Overseas Territory of the Falkland Islands' => 'fais.gif',
|
||||||
|
'International Federation of Vexillological Associations' => 'fiav.gif',
|
||||||
|
'Republic of Fiji' => 'fiji.gif',
|
||||||
|
'Republic of Finland' => 'finl.gif',
|
||||||
|
'Territory of French Polynesia' => 'fpol.gif',
|
||||||
|
'French Republic' => 'fran.gif',
|
||||||
|
'Overseas Department of French Guiana' => 'frgu.gif',
|
||||||
|
'Gabonese Republic' => 'gabn.gif',
|
||||||
|
'Republic of the Gambia' => 'gamb.gif',
|
||||||
|
'Republic of Georgia' => 'geor.gif',
|
||||||
|
'Federal Republic of Germany' => 'germ.gif',
|
||||||
|
'Republic of Ghana' => 'ghan.gif',
|
||||||
|
'Gibraltar' => 'gibr.gif',
|
||||||
|
'Hellenic Republic' => 'grec.gif',
|
||||||
|
'State of Grenada' => 'gren.gif',
|
||||||
|
'Overseas Department of Guadeloupe' => 'guad.gif',
|
||||||
|
'Territory of Guam' => 'guam.gif',
|
||||||
|
'Republic of Guatemala' => 'guat.gif',
|
||||||
|
'The Bailiwick of Guernsey' => 'guer.gif',
|
||||||
|
'Republic of Guinea' => 'guin.gif',
|
||||||
|
'Republic of Haiti' => 'hait.gif',
|
||||||
|
'Hong Kong Special Administrative Region' => 'hokn.gif',
|
||||||
|
'Republic of Honduras' => 'hond.gif',
|
||||||
|
'Republic of Hungary' => 'hung.gif',
|
||||||
|
'Republic of Iceland' => 'icel.gif',
|
||||||
|
'International Committee of the Red Cross' => 'icrc.gif',
|
||||||
|
'Republic of India' => 'inda.gif',
|
||||||
|
'Republic of Indonesia' => 'indn.gif',
|
||||||
|
'Republic of Iraq' => 'iraq.gif',
|
||||||
|
'Republic of Ireland' => 'irel.gif',
|
||||||
|
'Organization of the Islamic Conference' => 'isco.gif',
|
||||||
|
'Isle of Man' => 'isma.gif',
|
||||||
|
'State of Israel' => 'isra.gif',
|
||||||
|
'Italian Republic' => 'ital.gif',
|
||||||
|
'Jamaica' => 'jama.gif',
|
||||||
|
'Japan' => 'japa.gif',
|
||||||
|
'The Bailiwick of Jersey' => 'jers.gif',
|
||||||
|
'Hashemite Kingdom of Jordan' => 'jord.gif',
|
||||||
|
'Republic of Kazakhstan' => 'kazk.gif',
|
||||||
|
'Republic of Kenya' => 'keny.gif',
|
||||||
|
'Republic of Kiribati' => 'kirb.gif',
|
||||||
|
'State of Kuwait' => 'kuwa.gif',
|
||||||
|
'Kyrgyz Republic' => 'kyrg.gif',
|
||||||
|
'Republic of Latvia' => 'latv.gif',
|
||||||
|
'Lebanese Republic' => 'leba.gif',
|
||||||
|
'Kingdom of Lesotho' => 'lest.gif',
|
||||||
|
'Republic of Liberia' => 'libe.gif',
|
||||||
|
'Principality of Liechtenstein' => 'liec.gif',
|
||||||
|
'Republic of Lithuania' => 'lith.gif',
|
||||||
|
'Grand Duchy of Luxembourg' => 'luxe.gif',
|
||||||
|
'Macao Special Administrative Region' => 'maca.gif',
|
||||||
|
'Republic of Macedonia' => 'mace.gif',
|
||||||
|
'Republic of Madagascar' => 'mada.gif',
|
||||||
|
'Republic of the Marshall Islands' => 'mais.gif',
|
||||||
|
'Republic of Maldives' => 'mald.gif',
|
||||||
|
'Republic of Mali' => 'mali.gif',
|
||||||
|
'Federation of Malaysia' => 'mals018.gif',
|
||||||
|
'Republic of Malta' => 'malt.gif',
|
||||||
|
'Republic of Malawi' => 'malw.gif',
|
||||||
|
'Overseas Department of Martinique' => 'mart.gif',
|
||||||
|
'Islamic Republic of Mauritania' => 'maur.gif',
|
||||||
|
'Territorial Collectivity of Mayotte' => 'mayt.gif',
|
||||||
|
'United Mexican States' => 'mexc.gif',
|
||||||
|
'Federated States of Micronesia' => 'micr.gif',
|
||||||
|
'Midway Islands' => 'miis.gif',
|
||||||
|
'Republic of Moldova' => 'mold.gif',
|
||||||
|
'Principality of Monaco' => 'mona.gif',
|
||||||
|
'Republic of Mongolia' => 'mong.gif',
|
||||||
|
'British Overseas Territory of Montserrat' => 'mont.gif',
|
||||||
|
'Kingdom of Morocco' => 'morc.gif',
|
||||||
|
'Republic of Mozambique' => 'moza.gif',
|
||||||
|
'Republic of Mauritius' => 'mrts.gif',
|
||||||
|
'Union of Myanmar' => 'myan.gif',
|
||||||
|
'Republic of Namibia' => 'namb.gif',
|
||||||
|
'North Atlantic Treaty Organization' => 'nato.gif',
|
||||||
|
'Republic of Nauru' => 'naur.gif',
|
||||||
|
'Turkish Republic of Northern Cyprus' => 'ncyp.gif',
|
||||||
|
'Netherlands Antilles' => 'nean.gif',
|
||||||
|
'Kingdom of Nepal' => 'nepa.gif',
|
||||||
|
'Kingdom of the Netherlands' => 'neth.gif',
|
||||||
|
'Territory of Norfolk Island' => 'nfis.gif',
|
||||||
|
'Federal Republic of Nigeria' => 'ngra.gif',
|
||||||
|
'Republic of Nicaragua' => 'nica.gif',
|
||||||
|
'Republic of Niger' => 'nigr.gif',
|
||||||
|
'Niue' => 'niue.gif',
|
||||||
|
'Commonwealth of the Northern Mariana Islands' => 'nmar.gif',
|
||||||
|
'Province of Northern Ireland' => 'noir.gif',
|
||||||
|
'Nordic Council' => 'nord.gif',
|
||||||
|
'Kingdom of Norway' => 'norw.gif',
|
||||||
|
'Territory of New Caledonia and Dependencies' => 'nwca.gif',
|
||||||
|
'New Zealand' => 'nwze.gif',
|
||||||
|
'Organization of American States' => 'oast.gif',
|
||||||
|
'Organization of African Unity' => 'oaun.gif',
|
||||||
|
'International Olympic Committee' => 'olym.gif',
|
||||||
|
'Sultanate of Oman' => 'oman.gif',
|
||||||
|
'Organization of Petroleum Exporting Countries' => 'opec.gif',
|
||||||
|
'Islamic Republic of Pakistan' => 'paks.gif',
|
||||||
|
'Republic of Palau' => 'pala.gif',
|
||||||
|
'Independent State of Papua New Guinea' => 'pang.gif',
|
||||||
|
'Republic of Paraguay' => 'para.gif',
|
||||||
|
'Republic of the Philippines' => 'phil.gif',
|
||||||
|
'British Overseas Territory of the Pitcairn Islands' => 'piis.gif',
|
||||||
|
'Republic of Poland' => 'pola.gif',
|
||||||
|
'Republic of Portugal' => 'port.gif',
|
||||||
|
'Commonwealth of Puerto Rico' => 'purc.gif',
|
||||||
|
'State of Qatar' => 'qata.gif',
|
||||||
|
'Russian Federation' => 'russ.gif',
|
||||||
|
'Republic of Rwanda' => 'rwan.gif',
|
||||||
|
'Kingdom of Saudi Arabia' => 'saar.gif',
|
||||||
|
'Republic of San Marino' => 'sama.gif',
|
||||||
|
'Nordic Sami Conference' => 'sami.gif',
|
||||||
|
'Sark' => 'sark.gif',
|
||||||
|
'Scotland' => 'scot.gif',
|
||||||
|
'Principality of Seborga' => 'sebo.gif',
|
||||||
|
'Republic of Sierra Leone' => 'sile.gif',
|
||||||
|
'Republic of Singapore' => 'sing.gif',
|
||||||
|
'Republic of Korea' => 'skor.gif',
|
||||||
|
'Republic of Slovenia' => 'slva.gif',
|
||||||
|
'Somali Republic' => 'smla.gif',
|
||||||
|
'Republic of Somaliland' => 'smld.gif',
|
||||||
|
'Republic of South Africa' => 'soaf.gif',
|
||||||
|
'Solomon Islands' => 'sois.gif',
|
||||||
|
'Kingdom of Spain' => 'span.gif',
|
||||||
|
'Secretariat of the Pacific Community' => 'spco.gif',
|
||||||
|
'Democratic Socialist Republic of Sri Lanka' => 'srla.gif',
|
||||||
|
'Saint Lucia' => 'stlu.gif',
|
||||||
|
'Republic of the Sudan' => 'suda.gif',
|
||||||
|
'Republic of Suriname' => 'surn.gif',
|
||||||
|
'Slovak Republic' => 'svka.gif',
|
||||||
|
'Kingdom of Sweden' => 'swdn.gif',
|
||||||
|
'Swiss Confederation' => 'swit.gif',
|
||||||
|
'Syrian Arab Republic' => 'syra.gif',
|
||||||
|
'Kingdom of Swaziland' => 'szld.gif',
|
||||||
|
'Republic of China' => 'taiw.gif',
|
||||||
|
'Republic of Tajikistan' => 'tajk.gif',
|
||||||
|
'United Republic of Tanzania' => 'tanz.gif',
|
||||||
|
'Kingdom of Thailand' => 'thal.gif',
|
||||||
|
'Autonomous Region of Tibet' => 'tibe.gif',
|
||||||
|
'Turkmenistan' => 'tkst.gif',
|
||||||
|
'Togolese Republic' => 'togo.gif',
|
||||||
|
'Tokelau' => 'toke.gif',
|
||||||
|
'Kingdom of Tonga' => 'tong.gif',
|
||||||
|
'Tristan da Cunha' => 'trdc.gif',
|
||||||
|
'Tromelin' => 'tris.gif',
|
||||||
|
'Republic of Tunisia' => 'tuns.gif',
|
||||||
|
'Republic of Turkey' => 'turk.gif',
|
||||||
|
'Tuvalu' => 'tuva.gif',
|
||||||
|
'United Arab Emirates' => 'uaem.gif',
|
||||||
|
'Republic of Uganda' => 'ugan.gif',
|
||||||
|
'Ukraine' => 'ukrn.gif',
|
||||||
|
'United Kingdom of Great Britain' => 'unkg.gif',
|
||||||
|
'United Nations' => 'unna.gif',
|
||||||
|
'United States of America' => 'unst.gif',
|
||||||
|
'Oriental Republic of Uruguay' => 'urgy.gif',
|
||||||
|
'Virgin Islands of the United States' => 'usvs.gif',
|
||||||
|
'Republic of Uzbekistan' => 'uzbk.gif',
|
||||||
|
'State of the Vatican City' => 'vacy.gif',
|
||||||
|
'Republic of Vanuatu' => 'vant.gif',
|
||||||
|
'Bolivarian Republic of Venezuela' => 'venz.gif',
|
||||||
|
'Republic of Yemen' => 'yemn.gif',
|
||||||
|
'Democratic Republic of Congo' => 'zare.gif',
|
||||||
|
'Republic of Zimbabwe' => 'zbwe.gif'
|
||||||
|
) ;
|
||||||
|
|
||||||
|
|
BIN
src/classes/jpgraph/flags.dat
Normal file
BIN
src/classes/jpgraph/flags.dat
Normal file
Binary file not shown.
BIN
src/classes/jpgraph/flags_thumb100x100.dat
Normal file
BIN
src/classes/jpgraph/flags_thumb100x100.dat
Normal file
Binary file not shown.
BIN
src/classes/jpgraph/flags_thumb35x35.dat
Normal file
BIN
src/classes/jpgraph/flags_thumb35x35.dat
Normal file
Binary file not shown.
BIN
src/classes/jpgraph/flags_thumb60x60.dat
Normal file
BIN
src/classes/jpgraph/flags_thumb60x60.dat
Normal file
Binary file not shown.
@ -11,6 +11,7 @@
|
|||||||
require_once 'jpgraph_rgb.inc.php';
|
require_once 'jpgraph_rgb.inc.php';
|
||||||
require_once 'jpgraph_ttf.inc.php';
|
require_once 'jpgraph_ttf.inc.php';
|
||||||
require_once 'imageSmoothArc.php';
|
require_once 'imageSmoothArc.php';
|
||||||
|
require_once 'jpgraph_errhandler.inc.php';
|
||||||
|
|
||||||
// Line styles
|
// Line styles
|
||||||
define('LINESTYLE_SOLID',1);
|
define('LINESTYLE_SOLID',1);
|
||||||
@ -219,17 +220,11 @@ class Image {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static function GetWidth($aImg=null) {
|
static function GetWidth($aImg) {
|
||||||
if( $aImg === null ) {
|
|
||||||
$aImg = $this->img;
|
|
||||||
}
|
|
||||||
return imagesx($aImg);
|
return imagesx($aImg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function GetHeight($aImg=null) {
|
static function GetHeight($aImg) {
|
||||||
if( $aImg === null ) {
|
|
||||||
$aImg = $this->img;
|
|
||||||
}
|
|
||||||
return imagesy($aImg);
|
return imagesy($aImg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1951,8 +1946,8 @@ class RotImage extends Image {
|
|||||||
|
|
||||||
function __construct($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) {
|
function __construct($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) {
|
||||||
parent::__construct($aWidth,$aHeight,$aFormat,$aSetAutoMargin);
|
parent::__construct($aWidth,$aHeight,$aFormat,$aSetAutoMargin);
|
||||||
$this->dx=$this->left_margin+$this->plotwidth/2;
|
$this->dx=$this->width/2;
|
||||||
$this->dy=$this->top_margin+$this->plotheight/2;
|
$this->dy=$this->height/2;
|
||||||
$this->SetAngle($a);
|
$this->SetAngle($a);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2019,8 +2014,6 @@ class RotImage extends Image {
|
|||||||
|
|
||||||
function SetMargin($lm,$rm,$tm,$bm) {
|
function SetMargin($lm,$rm,$tm,$bm) {
|
||||||
parent::SetMargin($lm,$rm,$tm,$bm);
|
parent::SetMargin($lm,$rm,$tm,$bm);
|
||||||
$this->dx=$this->left_margin+$this->plotwidth/2;
|
|
||||||
$this->dy=$this->top_margin+$this->plotheight/2;
|
|
||||||
$this->UpdateRotMatrice();
|
$this->UpdateRotMatrice();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2271,7 +2264,7 @@ class ImgStreamCache {
|
|||||||
// image file doesn't exist or exists but is to old
|
// image file doesn't exist or exists but is to old
|
||||||
function GetAndStream($aImage,$aCacheFileName) {
|
function GetAndStream($aImage,$aCacheFileName) {
|
||||||
if( $this->Isvalid($aCacheFileName) ) {
|
if( $this->Isvalid($aCacheFileName) ) {
|
||||||
$this->StreamImgFile($aImage,$aCacheFileName);
|
return $this->StreamImgFile($aImage,$aCacheFileName);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
// File: JPG-CONFIG.INC
|
// File: JPG-CONFIG.INC
|
||||||
// Description: Configuration file for JpGraph library
|
// Description: Configuration file for JpGraph library
|
||||||
// Created: 2004-03-27
|
// Created: 2004-03-27
|
||||||
// Ver: $Id: jpg-config.inc.php 1749 2009-07-31 10:58:41Z ljp $
|
// Ver: $Id: jpg-config.inc.php 1871 2009-09-29 05:56:39Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Asial Corporation. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
|
|
||||||
@ -36,11 +36,10 @@
|
|||||||
//
|
//
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// define('CACHE_DIR','/tmp/jpgraph_cache/');
|
// define('CACHE_DIR','/tmp/jpgraph_cache/');
|
||||||
// define('TTF_DIR','/usr/share/fonts/truetype/');
|
// define('TTF_DIR','/usr/share/fonts/TrueType/');
|
||||||
// define('MBTTF_DIR','/usr/share/fonts/truetype/');
|
// define('MBTTF_DIR','/usr/share/fonts/TrueType/');
|
||||||
DEFINE("TTF_DIR", $gl_root_path . "BitstreamVeraFonts/");
|
DEFINE("TTF_DIR", $gl_root_path . "BitstreamVeraFonts/");
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// Cache directory specification for use with CSIM graphs that are
|
// Cache directory specification for use with CSIM graphs that are
|
||||||
// using the cache.
|
// using the cache.
|
||||||
@ -88,7 +87,7 @@ define('READ_CACHE',true);
|
|||||||
// Determine if the error handler should be image based or purely
|
// Determine if the error handler should be image based or purely
|
||||||
// text based. Image based makes it easier since the script will
|
// text based. Image based makes it easier since the script will
|
||||||
// always return an image even in case of errors.
|
// always return an image even in case of errors.
|
||||||
define('USE_IMAGE_ERROR_HANDLER',false);
|
define('USE_IMAGE_ERROR_HANDLER',true);
|
||||||
|
|
||||||
// Should the library examine the global php_errmsg string and convert
|
// Should the library examine the global php_errmsg string and convert
|
||||||
// any error in it to a graphical representation. This is handy for the
|
// any error in it to a graphical representation. This is handy for the
|
||||||
@ -131,17 +130,10 @@ define('CACHE_FILE_GROUP','www');
|
|||||||
// (Set to '' will give the default persmissions for the 'PHP-user')
|
// (Set to '' will give the default persmissions for the 'PHP-user')
|
||||||
define('CACHE_FILE_MOD',0664);
|
define('CACHE_FILE_MOD',0664);
|
||||||
|
|
||||||
// Decide if we should use the bresenham circle algorithm or the
|
|
||||||
// built in Arc(). Bresenham gives better visual apperance of circles
|
|
||||||
// but is more CPU intensive and slower then the built in Arc() function
|
|
||||||
// in GD. Turned off by default for speed
|
|
||||||
define('USE_BRESENHAM',false);
|
|
||||||
|
|
||||||
// Default theme class name
|
// Default theme class name
|
||||||
define('DEFAULT_THEME_CLASS', 'UniversalTheme');
|
define('DEFAULT_THEME_CLASS', 'UniversalTheme');
|
||||||
|
|
||||||
define('SUPERSAMPLING', true);
|
define('SUPERSAMPLING', true);
|
||||||
define('SUPERSAMPLING_SCALE', 1);
|
define('SUPERSAMPLING_SCALE', 1);
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -19,7 +19,7 @@ require_once('jpgraph_theme.inc.php');
|
|||||||
require_once('gd_image.inc.php');
|
require_once('gd_image.inc.php');
|
||||||
|
|
||||||
// Version info
|
// Version info
|
||||||
define('JPG_VERSION','4.0.1');
|
define('JPG_VERSION','4.3.1');
|
||||||
|
|
||||||
// Minimum required PHP version
|
// Minimum required PHP version
|
||||||
define('MIN_PHPVERSION','5.1.0');
|
define('MIN_PHPVERSION','5.1.0');
|
||||||
@ -740,11 +740,6 @@ class Graph {
|
|||||||
// Rotate the graph 90 degrees and set the margin
|
// Rotate the graph 90 degrees and set the margin
|
||||||
// when we have done a 90 degree rotation
|
// when we have done a 90 degree rotation
|
||||||
function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) {
|
function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) {
|
||||||
$lm = $lm ==0 ? floor(0.2 * $this->img->width) : $lm ;
|
|
||||||
$rm = $rm ==0 ? floor(0.1 * $this->img->width) : $rm ;
|
|
||||||
$tm = $tm ==0 ? floor(0.2 * $this->img->height) : $tm ;
|
|
||||||
$bm = $bm ==0 ? floor(0.1 * $this->img->height) : $bm ;
|
|
||||||
|
|
||||||
$adj = ($this->img->height - $this->img->width)/2;
|
$adj = ($this->img->height - $this->img->width)/2;
|
||||||
$this->img->SetMargin($tm-$adj,$bm-$adj,$rm+$adj,$lm+$adj);
|
$this->img->SetMargin($tm-$adj,$bm-$adj,$rm+$adj,$lm+$adj);
|
||||||
$this->img->SetCenter(floor($this->img->width/2),floor($this->img->height/2));
|
$this->img->SetCenter(floor($this->img->width/2),floor($this->img->height/2));
|
||||||
@ -1290,10 +1285,12 @@ class Graph {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->iTables != null) {
|
||||||
$n = count($this->iTables);
|
$n = count($this->iTables);
|
||||||
for( $i=0; $i < $n; ++$i ) {
|
for ($i = 0; $i < $n; ++$i) {
|
||||||
$csim .= $this->iTables[$i]->GetCSIMareas();
|
$csim .= $this->iTables[$i]->GetCSIMareas();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $csim;
|
return $csim;
|
||||||
}
|
}
|
||||||
@ -1367,7 +1364,7 @@ class Graph {
|
|||||||
|
|
||||||
// Now reconstruct any user URL argument
|
// Now reconstruct any user URL argument
|
||||||
reset($_GET);
|
reset($_GET);
|
||||||
while( list($key,$value) = each($_GET) ) {
|
foreach ($_GET as $key => $value) {
|
||||||
if( is_array($value) ) {
|
if( is_array($value) ) {
|
||||||
foreach ( $value as $k => $v ) {
|
foreach ( $value as $k => $v ) {
|
||||||
$urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v);
|
$urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v);
|
||||||
@ -1382,7 +1379,7 @@ class Graph {
|
|||||||
// but there is little else we can do. One idea for the
|
// but there is little else we can do. One idea for the
|
||||||
// future might be recreate the POST header in case.
|
// future might be recreate the POST header in case.
|
||||||
reset($_POST);
|
reset($_POST);
|
||||||
while( list($key,$value) = each($_POST) ) {
|
foreach ($_POST as $key => $value) {
|
||||||
if( is_array($value) ) {
|
if( is_array($value) ) {
|
||||||
foreach ( $value as $k => $v ) {
|
foreach ( $value as $k => $v ) {
|
||||||
$urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v);
|
$urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v);
|
||||||
@ -1492,7 +1489,7 @@ class Graph {
|
|||||||
else {
|
else {
|
||||||
$txts = $this->texts;
|
$txts = $this->texts;
|
||||||
}
|
}
|
||||||
$n = count($txts);
|
$n = is_array($txts) ? count($txts) : 0;
|
||||||
$min=null;
|
$min=null;
|
||||||
$max=null;
|
$max=null;
|
||||||
for( $i=0; $i < $n; ++$i ) {
|
for( $i=0; $i < $n; ++$i ) {
|
||||||
@ -1521,7 +1518,7 @@ class Graph {
|
|||||||
else {
|
else {
|
||||||
$txts = $this->texts;
|
$txts = $this->texts;
|
||||||
}
|
}
|
||||||
$n = count($txts);
|
$n = is_array($txts) ? count($txts) : 0;
|
||||||
$min=null;
|
$min=null;
|
||||||
$max=null;
|
$max=null;
|
||||||
for( $i=0; $i < $n; ++$i ) {
|
for( $i=0; $i < $n; ++$i ) {
|
||||||
@ -1572,8 +1569,10 @@ class Graph {
|
|||||||
foreach( $this->y2plots as $p ) {
|
foreach( $this->y2plots as $p ) {
|
||||||
list($xmin,$ymin) = $p->Min();
|
list($xmin,$ymin) = $p->Min();
|
||||||
list($xmax,$ymax) = $p->Max();
|
list($xmax,$ymax) = $p->Max();
|
||||||
$min = Min($xmin,$min);
|
if( $xmin !== null && $xmax !== null ) {
|
||||||
$max = Max($xmax,$max);
|
$min = Min($xmin, $min);
|
||||||
|
$max = Max($xmax, $max);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1583,8 +1582,10 @@ class Graph {
|
|||||||
foreach( $this->ynplots[$i] as $p ) {
|
foreach( $this->ynplots[$i] as $p ) {
|
||||||
list($xmin,$ymin) = $p->Min();
|
list($xmin,$ymin) = $p->Min();
|
||||||
list($xmax,$ymax) = $p->Max();
|
list($xmax,$ymax) = $p->Max();
|
||||||
$min = Min($xmin,$min);
|
if( $xmin !== null && $xmax !== null ) {
|
||||||
$max = Max($xmax,$max);
|
$min = Min($xmin, $min);
|
||||||
|
$max = Max($xmax, $max);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3021,7 +3022,7 @@ class Graph {
|
|||||||
|
|
||||||
// Get Y min and max values for added lines
|
// Get Y min and max values for added lines
|
||||||
function GetLinesYMinMax( $aLines ) {
|
function GetLinesYMinMax( $aLines ) {
|
||||||
$n = count($aLines);
|
$n = is_array($aLines) ? count($aLines) : 0;
|
||||||
if( $n == 0 ) return false;
|
if( $n == 0 ) return false;
|
||||||
$min = $aLines[0]->scaleposition ;
|
$min = $aLines[0]->scaleposition ;
|
||||||
$max = $min ;
|
$max = $min ;
|
||||||
@ -3039,7 +3040,7 @@ class Graph {
|
|||||||
|
|
||||||
// Get X min and max values for added lines
|
// Get X min and max values for added lines
|
||||||
function GetLinesXMinMax( $aLines ) {
|
function GetLinesXMinMax( $aLines ) {
|
||||||
$n = count($aLines);
|
$n = is_array($aLines) ? count($aLines) : 0;
|
||||||
if( $n == 0 ) return false ;
|
if( $n == 0 ) return false ;
|
||||||
$min = $aLines[0]->scaleposition ;
|
$min = $aLines[0]->scaleposition ;
|
||||||
$max = $min ;
|
$max = $min ;
|
||||||
@ -3588,7 +3589,7 @@ class Grid {
|
|||||||
|
|
||||||
if( $this->fill ) {
|
if( $this->fill ) {
|
||||||
// Draw filled areas
|
// Draw filled areas
|
||||||
$y2 = $aTicksPos[0];
|
$y2 = !empty($aTicksPos) ? $aTicksPos[0] : null;
|
||||||
$i=1;
|
$i=1;
|
||||||
while( $i < $nbrgrids ) {
|
while( $i < $nbrgrids ) {
|
||||||
$y1 = $y2;
|
$y1 = $y2;
|
||||||
@ -4335,14 +4336,14 @@ class LinearTicks extends Ticks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function HaveManualLabels() {
|
function HaveManualLabels() {
|
||||||
return count($this->iManualTickLabels) > 0;
|
return is_array($this->iManualTickLabels) ? count($this->iManualTickLabels) > 0 : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Specify all the tick positions manually and possible also the exact labels
|
// Specify all the tick positions manually and possible also the exact labels
|
||||||
function _doManualTickPos($aScale) {
|
function _doManualTickPos($aScale) {
|
||||||
$n=count($this->iManualTickPos);
|
$n=count($this->iManualTickPos);
|
||||||
$m=count($this->iManualMinTickPos);
|
$m= is_array($this->iManualMinTickPos) ? count($this->iManualMinTickPos) : 0;
|
||||||
$doLbl=count($this->iManualTickLabels) > 0;
|
$doLbl= is_array($this->iManualTickLabels) ? count($this->iManualTickLabels) > 0 : false;
|
||||||
|
|
||||||
$this->maj_ticks_pos = array();
|
$this->maj_ticks_pos = array();
|
||||||
$this->maj_ticklabels_pos = array();
|
$this->maj_ticklabels_pos = array();
|
||||||
@ -5009,7 +5010,7 @@ class LinearScale {
|
|||||||
$this->off=$img->left_margin;
|
$this->off=$img->left_margin;
|
||||||
$this->scale_factor = 0;
|
$this->scale_factor = 0;
|
||||||
if( $this->world_size > 0 ) {
|
if( $this->world_size > 0 ) {
|
||||||
$this->scale_factor=$this->world_abs_size/($this->world_size*1.0);
|
$this->scale_factor=$this->world_abs_size/($this->world_size*0.999999);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // y scale
|
else { // y scale
|
||||||
@ -5017,7 +5018,7 @@ class LinearScale {
|
|||||||
$this->off=$img->top_margin+$this->world_abs_size;
|
$this->off=$img->top_margin+$this->world_abs_size;
|
||||||
$this->scale_factor = 0;
|
$this->scale_factor = 0;
|
||||||
if( $this->world_size > 0 ) {
|
if( $this->world_size > 0 ) {
|
||||||
$this->scale_factor=-$this->world_abs_size/($this->world_size*1.0);
|
$this->scale_factor=-$this->world_abs_size/($this->world_size*0.999999);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$size = $this->world_size * $this->scale_factor;
|
$size = $this->world_size * $this->scale_factor;
|
||||||
@ -5569,7 +5570,7 @@ class Plot {
|
|||||||
|
|
||||||
function Clear() {
|
function Clear() {
|
||||||
$this->isRunningClear = true;
|
$this->isRunningClear = true;
|
||||||
$this->__construct($this->inputValues['aDatay'], $this->inputValues['aDatax']);
|
Plot::__construct($this->inputValues['aDatay'], $this->inputValues['aDatax']);
|
||||||
$this->isRunningClear = false;
|
$this->isRunningClear = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,6 +309,17 @@ class BarPlot extends Plot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @override
|
||||||
|
* Without overriding this method, $this->numpoints does not updated correctly.
|
||||||
|
*/
|
||||||
|
function Clear() {
|
||||||
|
$this->isRunningClear = true;
|
||||||
|
$this->__construct($this->inputValues['aDatay'], $this->inputValues['aDatax']);
|
||||||
|
$this->isRunningClear = false;
|
||||||
|
}
|
||||||
|
|
||||||
function Stroke($img,$xscale,$yscale) {
|
function Stroke($img,$xscale,$yscale) {
|
||||||
|
|
||||||
$numpoints = count($this->coords[0]);
|
$numpoints = count($this->coords[0]);
|
||||||
@ -696,9 +707,6 @@ class GroupBarPlot extends BarPlot {
|
|||||||
$this->numpoints = $plots[0]->numpoints;
|
$this->numpoints = $plots[0]->numpoints;
|
||||||
$this->width=0.7;
|
$this->width=0.7;
|
||||||
}
|
}
|
||||||
function GroupBarPlot($plots) {
|
|
||||||
self::__construct($plots);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------
|
//---------------
|
||||||
// PUBLIC METHODS
|
// PUBLIC METHODS
|
||||||
@ -719,7 +727,7 @@ class GroupBarPlot extends BarPlot {
|
|||||||
$n = count($this->plots);
|
$n = count($this->plots);
|
||||||
for($i=0; $i < $n; ++$i) {
|
for($i=0; $i < $n; ++$i) {
|
||||||
list($xm,$ym) = $this->plots[$i]->Min();
|
list($xm,$ym) = $this->plots[$i]->Min();
|
||||||
$xmin = max($xmin,$xm);
|
$xmin = min($xmin,$xm);
|
||||||
$ymin = min($ymin,$ym);
|
$ymin = min($ymin,$ym);
|
||||||
}
|
}
|
||||||
return array($xmin,$ymin);
|
return array($xmin,$ymin);
|
||||||
@ -1114,14 +1122,13 @@ class AccBarPlot extends BarPlot {
|
|||||||
|
|
||||||
// First stroke the accumulated value for the entire bar
|
// First stroke the accumulated value for the entire bar
|
||||||
// This value is always placed at the top/bottom of the bars
|
// This value is always placed at the top/bottom of the bars
|
||||||
if( $accy_neg < 0 ) {
|
if( $accy + $accy_neg < 0 ) {
|
||||||
$y=$yscale->Translate($accy_neg);
|
$y=$yscale->Translate($accy_neg);
|
||||||
$this->value->Stroke($img,$accy_neg,$x,$y);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$y=$yscale->Translate($accy);
|
$y=$yscale->Translate($accy);
|
||||||
$this->value->Stroke($img,$accy,$x,$y);
|
|
||||||
}
|
}
|
||||||
|
$this->value->Stroke($img,$accy + $accy_neg,$x,$y);
|
||||||
|
|
||||||
$accy = 0;
|
$accy = 0;
|
||||||
$accy_neg = 0;
|
$accy_neg = 0;
|
||||||
@ -1181,7 +1188,7 @@ class AccBarPlot extends BarPlot {
|
|||||||
$this->plots[$j]->value->SetMargin(-1);
|
$this->plots[$j]->value->SetMargin(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->plots[$j]->value->Stroke($img,$this->plots[$j]->coords[0][$i],$x,$y);
|
$this->plots[$j]->value->Stroke($img,$this->plots[$j]->coords[0][$i],round($x),round($y));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ class JpGraphException extends Exception {
|
|||||||
}
|
}
|
||||||
$errobj->Raise($this->getMessage());
|
$errobj->Raise($this->getMessage());
|
||||||
}
|
}
|
||||||
static public function defaultHandler(Exception $exception) {
|
static public function defaultHandler(Throwable $exception) {
|
||||||
global $__jpg_OldHandler;
|
global $__jpg_OldHandler;
|
||||||
if( $exception instanceof JpGraphException ) {
|
if( $exception instanceof JpGraphException ) {
|
||||||
$exception->Stroke();
|
$exception->Stroke();
|
||||||
|
@ -267,7 +267,7 @@ class FlagImages {
|
|||||||
private $iFlagData ;
|
private $iFlagData ;
|
||||||
private $iOrdIdx=array();
|
private $iOrdIdx=array();
|
||||||
|
|
||||||
function FlagImages($aSize=FLAGSIZE1) {
|
function __construct($aSize=FLAGSIZE1) {
|
||||||
switch($aSize) {
|
switch($aSize) {
|
||||||
case FLAGSIZE1 :
|
case FLAGSIZE1 :
|
||||||
case FLAGSIZE2 :
|
case FLAGSIZE2 :
|
||||||
@ -309,10 +309,9 @@ class FlagImages {
|
|||||||
$aOrd--;
|
$aOrd--;
|
||||||
$n = count($this->iOrdIdx);
|
$n = count($this->iOrdIdx);
|
||||||
if( $n == 0 ) {
|
if( $n == 0 ) {
|
||||||
reset($this->iCountryNameMap);
|
|
||||||
$this->iOrdIdx=array();
|
$this->iOrdIdx=array();
|
||||||
$i=0;
|
$i=0;
|
||||||
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
foreach( $this->iCountryNameMap as $key => $val ) {
|
||||||
$this->iOrdIdx[$i++] = array($val,$key);
|
$this->iOrdIdx[$i++] = array($val,$key);
|
||||||
}
|
}
|
||||||
$tmp=$this->iOrdIdx[$aOrd];
|
$tmp=$this->iOrdIdx[$aOrd];
|
||||||
@ -341,18 +340,16 @@ class FlagImages {
|
|||||||
$found=false;
|
$found=false;
|
||||||
$aName = strtolower($aName);
|
$aName = strtolower($aName);
|
||||||
$nlen = strlen($aName);
|
$nlen = strlen($aName);
|
||||||
reset($this->iCountryNameMap);
|
|
||||||
// Start by trying to match exact index name
|
// Start by trying to match exact index name
|
||||||
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
foreach( $this->iCountryNameMap as $key => $val ) {
|
||||||
if( $nlen == strlen($val) && $val == $aName ) {
|
if( $nlen == strlen($val) && $val == $aName ) {
|
||||||
$found=true;
|
$found=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( !$found ) {
|
if( !$found ) {
|
||||||
reset($this->iCountryNameMap);
|
|
||||||
// If the exact index doesn't work try a (partial) full name
|
// If the exact index doesn't work try a (partial) full name
|
||||||
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
foreach( $this->iCountryNameMap as $key => $val ) {
|
||||||
if( strpos(strtolower($key), $aName) !== false ) {
|
if( strpos(strtolower($key), $aName) !== false ) {
|
||||||
$found=true;
|
$found=true;
|
||||||
break;
|
break;
|
||||||
|
@ -410,8 +410,8 @@ class Gradient {
|
|||||||
$bdelta=($to_color[2]-$from_color[2])/$numcols;
|
$bdelta=($to_color[2]-$from_color[2])/$numcols;
|
||||||
$colorsperstep = $numcols/$arr_size;
|
$colorsperstep = $numcols/$arr_size;
|
||||||
$prevcolnum = -1;
|
$prevcolnum = -1;
|
||||||
$from_alpha = $from_color[3];
|
$from_alpha = floatval($from_color[3]);
|
||||||
$to_alpha = $to_color[3];
|
$to_alpha = floatval($to_color[3]);
|
||||||
$adelta = ( $to_alpha - $from_alpha ) / $numcols ;
|
$adelta = ( $to_alpha - $from_alpha ) / $numcols ;
|
||||||
for ($i=0; $i < $arr_size; ++$i) {
|
for ($i=0; $i < $arr_size; ++$i) {
|
||||||
$colnum = floor($colorsperstep*$i);
|
$colnum = floor($colorsperstep*$i);
|
||||||
|
@ -41,9 +41,6 @@ class LinePlot extends Plot{
|
|||||||
$this->color = ColorFactory::getColor();
|
$this->color = ColorFactory::getColor();
|
||||||
$this->fill_color = $this->color;
|
$this->fill_color = $this->color;
|
||||||
}
|
}
|
||||||
function LinePlot($datay,$datax=false) {
|
|
||||||
self::__construct($datay,$datax);
|
|
||||||
}
|
|
||||||
//---------------
|
//---------------
|
||||||
// PUBLIC METHODS
|
// PUBLIC METHODS
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ class LogTicks extends Ticks{
|
|||||||
private $ticklabels_pos = array();
|
private $ticklabels_pos = array();
|
||||||
//---------------
|
//---------------
|
||||||
// CONSTRUCTOR
|
// CONSTRUCTOR
|
||||||
function LogTicks() {
|
function __construct() {
|
||||||
}
|
}
|
||||||
//---------------
|
//---------------
|
||||||
// PUBLIC METHODS
|
// PUBLIC METHODS
|
||||||
|
@ -296,14 +296,16 @@ class PiePlot {
|
|||||||
|
|
||||||
// Make sure we don't plot more values than data points
|
// Make sure we don't plot more values than data points
|
||||||
// (in case the user added more legends than data points)
|
// (in case the user added more legends than data points)
|
||||||
$n = min(count($this->legends),count($this->data));
|
$legendsCount = is_array($this->legends) ? count($this->legends) : 0;
|
||||||
|
$n = min($legendsCount,count($this->data));
|
||||||
if( $this->legends != "" ) {
|
if( $this->legends != "" ) {
|
||||||
$this->legends = array_reverse(array_slice($this->legends,0,$n));
|
$this->legends = array_reverse(array_slice($this->legends,0,$n));
|
||||||
}
|
}
|
||||||
for( $i=$n-1; $i >= 0; --$i ) {
|
for( $i=$n-1; $i >= 0; --$i ) {
|
||||||
$l = $this->legends[$i];
|
$l = $this->legends[$i];
|
||||||
// Replace possible format with actual values
|
// Replace possible format with actual values
|
||||||
if( count($this->csimalts) > $i ) {
|
$count = is_array($this->csimalts) ? count($this->csimalts) : 0;
|
||||||
|
if( $count > $i ) {
|
||||||
$fmt = $this->csimalts[$i];
|
$fmt = $this->csimalts[$i];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -332,10 +334,12 @@ class PiePlot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( $this->setslicecolors==null ) {
|
if( $this->setslicecolors==null ) {
|
||||||
$graph->legend->Add($l,$colors[$ta[$i%$numcolors]],"",0,$this->csimtargets[$i],$alt,$wintarg);
|
$csimtarget = isset($this->csimtargets[$i]) ? $this->csimtargets[$i] : null;
|
||||||
|
$graph->legend->Add($l,$colors[$ta[$i%$numcolors]],"",0,$csimtarget,$alt,$wintarg);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$graph->legend->Add($l,$this->setslicecolors[$i%$numcolors],"",0,$this->csimtargets[$i],$alt,$wintarg);
|
$csimtarget = isset($this->csimtargets[$i]) ? $this->csimtargets[$i] : null;
|
||||||
|
$graph->legend->Add($l,$this->setslicecolors[$i%$numcolors],"",0,$csimtarget,$alt,$wintarg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -423,6 +423,7 @@ class PolarAxis extends Axis {
|
|||||||
$this->img->Line($x1,$y1,$x2,$y2);
|
$this->img->Line($x1,$y1,$x2,$y2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$a = (int) $a;
|
||||||
$a += $this->angle_step;
|
$a += $this->angle_step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -487,6 +488,7 @@ class PolarAxis extends Axis {
|
|||||||
if( $this->show_angle_tick ) {
|
if( $this->show_angle_tick ) {
|
||||||
$this->img->Line($x1,$y1,$x2,$y2);
|
$this->img->Line($x1,$y1,$x2,$y2);
|
||||||
}
|
}
|
||||||
|
$a = (int) $a;
|
||||||
$a += $this->angle_step;
|
$a += $this->angle_step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ class ScatterPlot extends Plot {
|
|||||||
//---------------
|
//---------------
|
||||||
// CONSTRUCTOR
|
// CONSTRUCTOR
|
||||||
function __construct($datay,$datax=false) {
|
function __construct($datay,$datax=false) {
|
||||||
if( (count($datax) != count($datay)) && is_array($datax)) {
|
if( is_array($datax) && (count($datax) != count($datay)) ) {
|
||||||
JpGraphError::RaiseL(20003);//("Scatterplot must have equal number of X and Y points.");
|
JpGraphError::RaiseL(20003);//("Scatterplot must have equal number of X and Y points.");
|
||||||
}
|
}
|
||||||
parent::__construct($datay,$datax);
|
parent::__construct($datay,$datax);
|
||||||
|
@ -141,10 +141,16 @@ class GTextTableCell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function SetGridWeight($aLeft=null,$aTop=null,$aBottom=null,$aRight=null) {
|
function SetGridWeight($aLeft=null,$aTop=null,$aBottom=null,$aRight=null) {
|
||||||
if( $aLeft !== null ) $this->iGridWeight[0] = $aLeft;
|
$weight_arr = array($aLeft, $aTop, $aBottom, $aRight);
|
||||||
if( $aTop !== null ) $this->iGridWeight[1] = $aTop;
|
for ($i = 0; $i < count($weight_arr); $i++) {
|
||||||
if( $aBottom !== null ) $this->iGridWeight[2] = $aBottom;
|
if ($weight_arr[$i] === "") {
|
||||||
if( $aRight !== null ) $this->iGridWeight[3] = $aRight;
|
$weight_arr[$i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( $aLeft !== null ) $this->iGridWeight[0] = $weight_arr[0];
|
||||||
|
if( $aTop !== null ) $this->iGridWeight[1] = $weight_arr[1];
|
||||||
|
if( $aBottom !== null ) $this->iGridWeight[2] = $weight_arr[2];
|
||||||
|
if( $aRight !== null ) $this->iGridWeight[3] = $weight_arr[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetMargin($aLeft,$aRight,$aTop,$aBottom) {
|
function SetMargin($aLeft,$aRight,$aTop,$aBottom) {
|
||||||
|
@ -127,12 +127,11 @@ class AquaTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$height = $img->height;
|
|
||||||
$graph->SetMargin(
|
$graph->SetMargin(
|
||||||
$img->raw_left_margin,
|
$img->raw_left_margin,
|
||||||
$img->raw_right_margin,
|
$img->raw_right_margin,
|
||||||
$img->raw_top_margin,
|
$img->raw_top_margin,
|
||||||
$height * 0.25
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,8 +109,12 @@ class GreenTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$height = $img->height;
|
$graph->SetMargin(
|
||||||
$graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25);
|
$img->raw_left_margin,
|
||||||
|
$img->raw_right_margin,
|
||||||
|
$img->raw_top_margin,
|
||||||
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,8 +111,12 @@ class OceanTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$height = $img->height;
|
$graph->SetMargin(
|
||||||
$graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25);
|
$img->raw_left_margin,
|
||||||
|
$img->raw_right_margin,
|
||||||
|
$img->raw_top_margin,
|
||||||
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,8 +111,12 @@ class OrangeTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$height = $img->height;
|
$graph->SetMargin(
|
||||||
$graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25);
|
$img->raw_left_margin,
|
||||||
|
$img->raw_right_margin,
|
||||||
|
$img->raw_top_margin,
|
||||||
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,8 +105,12 @@ class PastelTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$height = $img->height;
|
$graph->SetMargin(
|
||||||
$graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25);
|
$img->raw_left_margin,
|
||||||
|
$img->raw_right_margin,
|
||||||
|
$img->raw_top_margin,
|
||||||
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,8 +111,12 @@ class RoseTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$height = $img->height;
|
$graph->SetMargin(
|
||||||
$graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25);
|
$img->raw_left_margin,
|
||||||
|
$img->raw_right_margin,
|
||||||
|
$img->raw_top_margin,
|
||||||
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,8 +129,12 @@ class SoftyTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $img->height * 0.25);
|
$graph->SetMargin(
|
||||||
// $graph->SetMargin(200, $img->right_margin, $img->top_margin, $height * 0.25);
|
$img->raw_left_margin,
|
||||||
|
$img->raw_right_margin,
|
||||||
|
$img->raw_top_margin,
|
||||||
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,12 +114,11 @@ class UniversalTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$height = $img->height;
|
|
||||||
$graph->SetMargin(
|
$graph->SetMargin(
|
||||||
$img->raw_left_margin,
|
$img->raw_left_margin,
|
||||||
$img->raw_right_margin,
|
$img->raw_right_margin,
|
||||||
$img->raw_top_margin,
|
$img->raw_top_margin,
|
||||||
$height * 0.25
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,12 @@ class VividTheme extends Theme
|
|||||||
function PreStrokeApply($graph) {
|
function PreStrokeApply($graph) {
|
||||||
if ($graph->legend->HasItems()) {
|
if ($graph->legend->HasItems()) {
|
||||||
$img = $graph->img;
|
$img = $graph->img;
|
||||||
$height = $img->height;
|
$graph->SetMargin(
|
||||||
$graph->SetMargin($img->left_margin, $img->right_margin, $img->top_margin, $height * 0.25);
|
$img->raw_left_margin,
|
||||||
|
$img->raw_right_margin,
|
||||||
|
$img->raw_top_margin,
|
||||||
|
is_numeric($img->raw_bottom_margin) ? $img->raw_bottom_margin : $img->height * 0.25
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user