diff --git a/.churn.yml b/.churn.yml
new file mode 100644
index 00000000..71971f5b
--- /dev/null
+++ b/.churn.yml
@@ -0,0 +1,16 @@
+# The maximum number of files to display in the results table.
+# Default: 10
+filesToShow: 20
+
+# The minimum score a file need to display in the results table.
+# Default: 0.1
+minScoreToShow: 0
+
+# The number of parallel jobs to use when processing files.
+# Default: 10
+parallelJobs: 10
+
+# How far back in the git history to count the number of commits to a file
+# Can be a human readable date like 'One week ago' or a date like '2017-07-12'
+# Default: '10 Years ago'
+commitsSince: One year ago
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ea800aed..187d01ba 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: 'ubuntu-latest'
strategy:
matrix:
- php: ['7.2', '7.3', '7.4', '8.0']
+ php: ['7.4', '8.0']
name: PHP ${{ matrix.php }} - 'ubuntu-latest' - 'prefer-stable'
@@ -28,7 +28,10 @@ jobs:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install PHP dependencies
- run: composer update --'prefer-stable' --no-interaction --no-progress
+ run: composer update --'prefer-stable' --no-interaction --no-progress --ignore-platform-reqs
+
+ - name: PHPLint
+ run: composer lint
- name: Unit Tests
- run: composer test
+ run: composer test
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 897c71ac..b458ae2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,14 +17,12 @@ nbproject
.phpcs.config.xml
.phpmd.xml
.pmd.log
-psalm.xml
# ignore huge fonts
.churn.yml
.php_cs.cache
-.phpcs.config.xml
.phpmd.xml
.pmd.log
-psalm.xml
+
# ignore huge fonts
tests/_output/coverage
Examples/assets/bkai00mp.ttf
diff --git a/.php_cs.cache b/.php_cs.cache
index 50d44792..9e6f2bc1 100644
--- a/.php_cs.cache
+++ b/.php_cs.cache
@@ -1 +1 @@
-{"php":"7.2.25-1+ubuntu18.04.1+deb.sury.org+1","version":"2.14.0:v2.14.0#b788ea0af899cedc8114dca7db119c93b6685da2","rules":{"no_php4_constructor":true,"php_unit_namespaced":{"target":"6.0"},"php_unit_dedicate_assert":{"target":"5.6"},"php_unit_expectation":{"target":"5.6"},"php_unit_mock":{"target":"5.5"},"php_unit_no_expectation_annotation":{"target":"4.3"},"binary_operator_spaces":{"align_double_arrow":true,"align_equals":true},"blank_line_after_opening_tag":true,"blank_line_before_statement":true,"braces":true,"cast_spaces":true,"class_attributes_separation":{"elements":["method"]},"class_definition":true,"concat_space":{"spacing":"one"},"declare_equal_normalize":true,"function_typehint_space":true,"include":true,"increment_style":true,"lowercase_cast":true,"lowercase_static_reference":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"ensure_fully_multiline":true},"native_function_casing":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["break","continue","extra","return","throw","use","parenthesis_brace_block","square_brace_block","curly_brace_block"]},"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":{"use":"echo"},"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":true,"no_unneeded_curly_braces":true,"no_unneeded_final_method":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"no_whitespace_in_blank_line":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"php_unit_fqcn_annotation":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_empty_return":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_types":true,"phpdoc_types_order":true,"phpdoc_var_without_name":true,"protected_to_private":true,"return_type_declaration":true,"semicolon_after_instruction":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_class_element_per_statement":{"elements":["property"]},"single_quote":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"ternary_operator_spaces":true,"trailing_comma_in_multiline_array":true,"trim_array_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"blank_line_after_namespace":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_constants":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"modernize_types_casting":true,"align_multiline_comment":true,"array_syntax":{"syntax":"short"},"combine_consecutive_issets":true,"combine_consecutive_unsets":true,"compact_nullable_typehint":true,"escape_implicit_backslashes":true,"explicit_indirect_variable":true,"explicit_string_variable":true,"final_internal_class":true,"header_comment":{"commentType":"PHPDoc","header":"JPGraph v4.0.2"},"heredoc_to_nowdoc":true,"list_syntax":{"syntax":"long"},"method_chaining_indentation":true,"multiline_comment_opening_closing":true,"no_null_property_initialization":true,"no_short_echo_tag":true,"no_superfluous_elseif":true,"no_unreachable_default_argument_value":true,"no_useless_else":true,"no_useless_return":true,"ordered_imports":true,"php_unit_strict":true,"php_unit_test_annotation":true,"php_unit_test_class_requires_covers":true,"phpdoc_add_missing_param_annotation":true,"phpdoc_order":true,"strict_param":true},"hashes":{"Examples\/examples_axis\/axislabelbkgex05.php":3928333662,"Examples\/examples_axis\/axislabelbkgex07.php":1834588735,"Examples\/examples_axis\/topxaxis.php":2757963232,"Examples\/examples_axis\/axislabelbkgex04.php":2180924149,"Examples\/examples_axis\/mulyaxisex1.php":2530638254,"Examples\/examples_axis\/inyaxisex1.php":2853480798,"Examples\/examples_axis\/inyaxisex2.php":955135800,"Examples\/examples_axis\/axislabelbkgex02.php":2700915146,"Examples\/examples_axis\/inyaxisex3.php":1441625628,"Examples\/examples_axis\/axislabelbkgex03.php":3746887550,"Examples\/examples_axis\/axislabelbkgex01.php":3426242382,"Examples\/examples_axis\/axislabelbkgex06.php":2563743833,"Examples\/examples_axis\/dupyaxisex1.php":173988655,"Examples\/examples_radar\/no_test_radarex3.php":3868242638,"Examples\/examples_radar\/no_test_radarex6.php":2521417068,"Examples\/examples_radar\/no_test_radarex8.1.php":3723319032,"Examples\/examples_radar\/no_test_radarex5.php":61455593,"Examples\/examples_radar\/no_test_radarlogex1-aa.php":536696613,"Examples\/examples_radar\/no_test_radarex2.php":3934449354,"Examples\/examples_radar\/no_test_radarmarkex1.php":225750134,"Examples\/examples_radar\/no_test_radarex6.1.php":2840348491,"Examples\/examples_radar\/no_test_radarex4.php":1797199812,"Examples\/examples_radar\/no_test_radarex1.php":3452092710,"Examples\/examples_radar\/no_test_radarlogex2.php":1713043735,"Examples\/examples_radar\/no_test_radarex9.php":2545838607,"Examples\/examples_radar\/no_test_fixscale_radarex1.php":1699744046,"Examples\/examples_radar\/no_test_radarlogex1.php":3863961377,"Examples\/examples_radar\/no_test_radarex7.php":3561545258,"Examples\/examples_radar\/no_test_radarex8.php":4214029496,"Examples\/examples_qr\/no_test_qrexample12.php":1597536250,"Examples\/examples_qr\/no_test_qrexample11.php":2404283031,"Examples\/examples_qr\/no_test_qr_template.php":1063573673,"Examples\/examples_qr\/no_test_qrexample03.php":3651872596,"Examples\/examples_qr\/no_test_qrexample08.php":1041936236,"Examples\/examples_qr\/no_test_qrexample07.php":1808863611,"Examples\/examples_qr\/no_test_qrexample02.php":1446368015,"Examples\/examples_qr\/no_test_qrexample05.php":1256004673,"Examples\/examples_qr\/no_test_qrexample09.php":162267686,"Examples\/examples_qr\/no_test_qrexample04.php":2564857222,"Examples\/examples_qr\/no_test_qrexample00.php":1218454383,"Examples\/examples_qr\/no_test_qrexample01.php":2437737867,"Examples\/examples_qr\/no_test_qrexample10.php":1848108736,"Examples\/examples_qr\/no_test_qrexample0.php":3894794299,"Examples\/examples_qr\/no_test_qrexample06.php":3554971290,"Examples\/examples_tables\/no_test_tableex00.php":1621829617,"Examples\/examples_tables\/no_test_table_vtext.php":3789770623,"Examples\/examples_tables\/no_test_table_mex3.php":4052645864,"Examples\/examples_tables\/no_test_table_howto5.php":1973110984,"Examples\/examples_tables\/no_test_table_howto1.php":2250158419,"Examples\/examples_tables\/no_test_table_mex1.php":2286297279,"Examples\/examples_tables\/no_test_table_howto7.php":3838717026,"Examples\/examples_tables\/no_test_tableex04.php":493695426,"Examples\/examples_tables\/no_test_table_howto8.php":253625091,"Examples\/examples_tables\/no_test_table_howto7.2.php":3838717026,"Examples\/examples_tables\/no_test_table_howto4.php":1909638931,"Examples\/examples_tables\/no_test_tableex05.php":3771324018,"Examples\/examples_tables\/no_test_table_flagex1.php":2903786262,"Examples\/examples_tables\/no_test_table_howto2.php":90530336,"Examples\/examples_tables\/no_test_table_mex0.php":4120859409,"Examples\/examples_tables\/no_test_table_howto9.php":3045856375,"Examples\/examples_tables\/no_test_tableex01.php":1424338103,"Examples\/examples_tables\/no_test_table_howto7.1.php":3501112184,"Examples\/examples_tables\/no_test_table_howto3.php":3855437807,"Examples\/examples_tables\/no_test_table_howto6.php":3147951865,"Examples\/examples_tables\/no_test_table_vtext_ex1.php":1482573722,"Examples\/examples_tables\/no_test_table_mex00.php":2566674401,"Examples\/examples_tables\/no_test_tablebarex1.php":1624090913,"Examples\/examples_tables\/no_test_table_mex2.php":1586880804,"Examples\/examples_tables\/no_test_tableex03.php":1701790476,"Examples\/examples_tables\/no_test_tableex02.php":3626608760,"Examples\/examples_rotate\/rotex4.php":2023347771,"Examples\/examples_rotate\/rotex0.php":232294184,"Examples\/examples_rotate\/rotex2.php":692951460,"Examples\/examples_rotate\/rotex1.php":2990855960,"Examples\/examples_rotate\/rotateex1.php":4153743188,"Examples\/examples_rotate\/rotex3.php":2305234069,"Examples\/examples_rotate\/rotex5.php":670796440,"Examples\/show-example.php":3565660336,"Examples\/listallflags.php":3251472858,"Examples\/examples_led\/no_test_ledex13.php":500391216,"Examples\/examples_led\/no_test_ledex14.php":4086908037,"Examples\/examples_led\/no_test_ledex3.php":1743436479,"Examples\/examples_led\/no_test_ledex5.php":955302513,"Examples\/examples_led\/no_test_ledex4.1.php":944835095,"Examples\/examples_led\/no_test_ledex7.php":3289614329,"Examples\/examples_led\/no_test_ledex1.php":372564865,"Examples\/examples_led\/no_test_ledex10.php":994308480,"Examples\/examples_led\/no_test_ledex6.php":3703265112,"Examples\/examples_led\/no_test_ledex8.php":226989521,"Examples\/examples_led\/no_test_ledex12.php":4126337532,"Examples\/examples_led\/no_test_ledex_cyrillic2.php":2809294108,"Examples\/examples_led\/no_test_ledex9.php":1307165677,"Examples\/examples_led\/no_test_ledex15.php":1469158298,"Examples\/examples_led\/no_test_ledex17.php":4222433548,"Examples\/examples_led\/no_test_ledex4.2.php":1210457329,"Examples\/examples_led\/no_test_ledex4.php":6979940,"Examples\/examples_led\/no_test_ledex16.php":513878316,"Examples\/examples_led\/no_test_ledex_cyrillic.php":1487854206,"Examples\/examples_led\/no_test_ledex2.php":2851002163,"Examples\/examples_led\/no_test_ledex11.php":1974711695,"Examples\/examples_img\/imgmarkerex1.php":2247194776,"Examples\/examples_img\/bkgimgflagex1.php":3129256617,"Examples\/examples_img\/no_dim_bkgimgflagex4.php":4290959750,"Examples\/examples_img\/no_dim_bkgimgflagex3.php":529420125,"Examples\/examples_img\/no_dim_bkgimgflagex5.php":832412815,"Examples\/examples_img\/antispamex01.php":2257907534,"Examples\/examples_img\/no_dim_bkgimgflagex2.php":3700838011,"Examples\/examples_odometer\/no_test_odoex09.php":641326295,"Examples\/examples_odometer\/no_test_odotutex01.php":604412924,"Examples\/examples_odometer\/no_test_odotutex17.php":2974712614,"Examples\/examples_odometer\/no_test_odotutex03.php":2363013503,"Examples\/examples_odometer\/no_test_odoex03.php":236210310,"Examples\/examples_odometer\/no_test_odotutex15.php":4026967969,"Examples\/examples_odometer\/no_test_odotutex16.1.php":1828326169,"Examples\/examples_odometer\/no_test_odoex011.php":187062647,"Examples\/examples_odometer\/no_test_odotutex19.php":271641895,"Examples\/examples_odometer\/no_test_odotutex11.php":1961351428,"Examples\/examples_odometer\/no_test_odoex07.php":2702061502,"Examples\/examples_odometer\/no_test_odoex02.php":1863011469,"Examples\/examples_odometer\/no_test_odotutex14.php":2876640897,"Examples\/examples_odometer\/no_test_odotutex12.php":232555478,"Examples\/examples_odometer\/no_test_odotutex08.php":258076088,"Examples\/examples_odometer\/no_test_odotutex18.php":1639734162,"Examples\/examples_odometer\/no_test_odotutex06.php":221947754,"Examples\/examples_odometer\/no_test_odotutex09.php":998275122,"Examples\/examples_odometer\/no_test_odotutex02.php":119408006,"Examples\/examples_odometer\/no_test_odotutex10.php":2747280960,"Examples\/examples_odometer\/no_test_odoex012.php":2346130681,"Examples\/examples_odometer\/no_test_odotutex04.php":2728951189,"Examples\/examples_odometer\/no_test_odotutex07.php":2523196579,"Examples\/examples_odometer\/no_test_odotutex00.php":3447495334,"Examples\/examples_odometer\/no_test_odotutex16.php":3752638365,"Examples\/examples_odometer\/no_test_odoex05.php":422098414,"Examples\/examples_odometer\/no_test_odoex06.php":2591065792,"Examples\/examples_odometer\/no_test_odotutex08.1.php":295692406,"Examples\/examples_odometer\/no_test_odoex01.php":3541917435,"Examples\/examples_odometer\/no_test_odoex04.php":2194820501,"Examples\/examples_odometer\/no_test_odoex08.php":3153147067,"Examples\/examples_odometer\/no_test_odoex00.php":3959139861,"Examples\/examples_odometer\/no_test_odotutex13.php":1262648936,"Examples\/examples_odometer\/no_test_odoex010.php":2084842410,"Examples\/examples_matrix\/no_test_matrix_ex04.php":1655065944,"Examples\/examples_matrix\/no_test_matrix_ex01.php":4039938405,"Examples\/examples_matrix\/no_test_matrixex00.php":3083193718,"Examples\/examples_matrix\/no_test_matrix_ex03.php":3443406235,"Examples\/examples_matrix\/no_test_matrix_edgeex02.php":3722874941,"Examples\/examples_matrix\/no_test_matrix_edgeex01.php":4097072748,"Examples\/examples_matrix\/no_test_matrix_ex06.php":467890065,"Examples\/examples_matrix\/no_test_matrix_layout_ex1.php":3669059016,"Examples\/examples_matrix\/no_test_matrix_ex05.php":2382252974,"Examples\/examples_matrix\/no_test_matrix_ex02.php":3082140113,"Examples\/examples_matrix\/no_test_matrix_ex04.2.php":3112643429,"Examples\/examples_matrix\/no_test_matrix_ex04.1.php":4237528459,"Examples\/examples_matrix\/no_test_matrix_ex0.php":3370653823,"Examples\/examples_matrix\/no_test_matrix_introex.php":2981535297,"Examples\/show-image.php":1303372416,"Examples\/examples_staticband\/staticbandbarex1.php":155677979,"Examples\/examples_staticband\/staticbandbarex4.php":2961948779,"Examples\/examples_staticband\/staticbandbarex3.php":2394592040,"Examples\/examples_staticband\/smallstaticbandsex6.php":1220803675,"Examples\/examples_staticband\/smallstaticbandsex9.php":1897288238,"Examples\/examples_staticband\/smallstaticbandsex7.php":2077674849,"Examples\/examples_staticband\/smallstaticbandsex10.php":2083278486,"Examples\/examples_staticband\/staticbandbarex5.php":1079890036,"Examples\/examples_staticband\/smallstaticbandsex5.php":3401437750,"Examples\/examples_staticband\/smallstaticbandsex8.php":1750215085,"Examples\/examples_staticband\/staticbandbarex7.php":959852870,"Examples\/examples_staticband\/smallstaticbandsex4.php":3679023789,"Examples\/examples_staticband\/staticbandbarex2.php":3496791938,"Examples\/examples_staticband\/smallstaticbandsex1.php":3806418978,"Examples\/examples_staticband\/smallstaticbandsex2.php":2379233763,"Examples\/examples_staticband\/smallstaticbandsex3.php":1841488829,"Examples\/examples_staticband\/staticbandbarex6.php":3470057353,"Examples\/examples_staticband\/smallstaticbandsex11.php":2083278486,"Examples\/example_list.php":3847272443,"Examples\/examples_date\/datescaleticksex01.php":819511981,"Examples\/examples_date\/dateaxisex1.php":1654015931,"Examples\/examples_date\/dateaxisex3.php":3136994984,"Examples\/examples_date\/dateaxisex4.php":2807975725,"Examples\/examples_date\/dateutilex01.php":224863821,"Examples\/examples_date\/dateaxisex2.php":4146555130,"Examples\/examples_date\/dateutilex02.php":2530353988,"Examples\/examples_date\/prepaccdata_example.php":389248718,"Examples\/examples_line\/gradlinefillex1.php":1432673032,"Examples\/examples_line\/filledgridex1.php":1392926845,"Examples\/examples_line\/linebarex3.php":1885905435,"Examples\/examples_line\/clipping_ex1.php":939948426,"Examples\/examples_line\/linebarex2.php":408292221,"Examples\/examples_line\/lineimagefillex1.php":3397448251,"Examples\/examples_line\/manscaleex1.php":3922453849,"Examples\/examples_line\/filledstepstyleex1.php":2929856694,"Examples\/examples_line\/centeredlineex01.php":1865773989,"Examples\/examples_line\/gradlinefillex3.php":1578848597,"Examples\/examples_line\/funcex2.php":1205697836,"Examples\/examples_line\/builtinplotmarksex1.php":4007516308,"Examples\/examples_line\/no_test_lineiconex2.php":762733766,"Examples\/examples_line\/linlogex1.php":2656623607,"Examples\/examples_line\/linegraceex.php":798810163,"Examples\/examples_line\/titleex1.php":3785710465,"Examples\/examples_line\/y2synch2.php":2815358965,"Examples\/examples_line\/no_test_new_line5.php":203438287,"Examples\/examples_line\/no_dim_plotlineex1.php":2451647066,"Examples\/examples_line\/manscaleex4.php":910475213,"Examples\/examples_line\/filledline01.php":4072358886,"Examples\/examples_line\/filledlineex01.1.php":3225742188,"Examples\/examples_line\/staticlinebarex1.php":1950958304,"Examples\/examples_line\/no_test_new_line4.php":3304674212,"Examples\/examples_line\/filledlineex03.php":1686155735,"Examples\/examples_line\/manscaleex3.php":649978586,"Examples\/examples_line\/filledlineex01.php":2717687529,"Examples\/examples_line\/new_line3.php":3667904264,"Examples\/examples_line\/no_test_new_line1.php":442701790,"Examples\/examples_line\/funcex3.php":3605005700,"Examples\/examples_line\/y2synch.php":4215366847,"Examples\/examples_line\/no_test_lineiconex1.php":2001745426,"Examples\/examples_line\/centerlinebarex1.php":2584343529,"Examples\/examples_line\/gradlinefillex4.php":3911062572,"Examples\/examples_line\/funcex1.php":3332087276,"Examples\/examples_line\/interpolation-growth.php":3345752438,"Examples\/examples_line\/gradlinefillex2.php":3137037495,"Examples\/examples_line\/interpolation-growth-log.php":2365196742,"Examples\/examples_line\/funcex4.php":2851048078,"Examples\/examples_line\/gradbkgex1.php":3508971878,"Examples\/examples_line\/manscaleex2.php":249985242,"Examples\/examples_line\/timestampex01.php":1949371051,"Examples\/examples_line\/clipping_ex2.php":518826772,"Examples\/examples_line\/centeredlineex03.php":1863662367,"Examples\/examples_line\/centeredlineex02.php":1755448275,"Examples\/examples_line\/partiallyfilledlineex1.php":3665212954,"Examples\/examples_line\/filledlineex02.php":2598911797,"Examples\/examples_line\/no_test_new_line2.php":3850979709,"Examples\/examples_line\/linebarex1.php":1484809507,"Examples\/examples_line\/linebarcentex1.php":3482864573,"Examples\/examples_line\/nullvalueex01.php":3334654856,"Examples\/examples_line\/splineex1.php":1721596608,"Examples\/examples_line\/tabtitleex1.php":1638527443,"Examples\/examples_line\/no_test_new_step1.php":1156283291,"Examples\/examples_multigraph\/no_test_combgraphex2.php":3373539302,"Examples\/examples_multigraph\/no_test_comb90dategraphex01.php":84418407,"Examples\/examples_multigraph\/no_test_combgraphex1.php":94032061,"Examples\/examples_multigraph\/no_test_comb90dategraphex02.php":459050099,"Examples\/examples_multigraph\/example_two_piecharts.php":3996677113,"Examples\/examples_multigraph\/no_test_comb90dategraphex03.php":2697791683,"Examples\/examples_sunspot\/no_test_sunspotsex3.php":108371862,"Examples\/examples_sunspot\/no_test_sunspotsex1.php":266510925,"Examples\/examples_sunspot\/no_test_sunspotsex6.php":1987367315,"Examples\/examples_sunspot\/no_test_sunspotsex5.php":4181670777,"Examples\/examples_sunspot\/no_test_sunspotsex4.php":1101433041,"Examples\/examples_sunspot\/no_test_sunspotsex7.php":4275100532,"Examples\/examples_sunspot\/no_test_sunspotsex2.php":2530077041,"Examples\/examples_gantt\/ganttex01.php":2292730545,"Examples\/examples_gantt\/gantt_samerowex2.php":884292805,"Examples\/examples_gantt\/gantt_samerowex1.php":1794850009,"Examples\/examples_gantt\/ganttex07.php":3372819376,"Examples\/examples_gantt\/ganttex11.php":1256069993,"Examples\/examples_gantt\/gantt_textex1.php":1766726420,"Examples\/examples_gantt\/ganttmonthyearex3.php":3641883142,"Examples\/examples_gantt\/ganttconstrainex1.php":1043041635,"Examples\/examples_gantt\/gantticonex1.php":2445822884,"Examples\/examples_gantt\/ganttcolumnfontsex01.php":1075425390,"Examples\/examples_gantt\/gantthgridex1.php":3110275305,"Examples\/examples_gantt\/ganttex00.php":845806239,"Examples\/examples_gantt\/ganttmonthyearex1.php":3726328433,"Examples\/examples_gantt\/ganttex10.php":2197596020,"Examples\/examples_gantt\/ganttex17.php":762718061,"Examples\/examples_gantt\/ganttex02.php":775458434,"Examples\/examples_gantt\/ganttex13-zoom1.php":1891828348,"Examples\/examples_gantt\/ganttex17-flag.php":2558963444,"Examples\/examples_gantt\/ganttex14.php":1494992369,"Examples\/examples_gantt\/ganttex09.php":3612522737,"Examples\/examples_gantt\/ganttex13.php":194655069,"Examples\/examples_gantt\/ganttmonthyearex2.php":37934241,"Examples\/examples_gantt\/gantthourex1.php":2814865024,"Examples\/examples_gantt\/ganttex_slice.php":2686709781,"Examples\/examples_gantt\/ganttsimpleex1.php":4159188260,"Examples\/examples_gantt\/ganttmonthyearex4.php":941977738,"Examples\/examples_gantt\/ganttex03.php":1116744133,"Examples\/examples_gantt\/multconstganttex01.php":815734063,"Examples\/examples_gantt\/ganttex08.php":3337466220,"Examples\/examples_gantt\/no_test_ganttex19.php":3394335749,"Examples\/examples_gantt\/ganttex30.php":2458148951,"Examples\/examples_gantt\/ganttex04.php":1930103304,"Examples\/examples_gantt\/ganttconstrainex0.php":763538892,"Examples\/examples_gantt\/ganttex06.php":2475864160,"Examples\/examples_gantt\/ganttex12.php":1273287267,"Examples\/examples_gantt\/ganttex16.php":2148230231,"Examples\/examples_gantt\/ganttex05.php":3881724578,"Examples\/examples_gantt\/ganttex18.php":3152843105,"Examples\/examples_gantt\/ganttconstrainex2.php":256213396,"Examples\/examples_gantt\/ganttex15.php":3453318140,"Examples\/examples_gantt\/ganttex13-zoom2.php":3453124055,"Examples\/examples_gantt\/gantthourminex1.php":322109301,"Examples\/examples_theme\/no_test_fusion_example.php":1114973382,"Examples\/examples_theme\/no_test_theme_example.php":769584650,"Examples\/examples_theme\/no_test_orange_example.php":4158310285,"Examples\/examples_theme\/no_test_vivid_example.php":1279928249,"Examples\/examples_theme\/no_test_pastel_example.php":1453697306,"Examples\/examples_theme\/aqua_example.php":364108113,"Examples\/examples_theme\/no_test_green_example.php":1808436724,"Examples\/examples_theme\/no_test_rose_example.php":2406780932,"Examples\/examples_theme\/no_test_softy_example.php":1636399368,"Examples\/examples_theme\/no_test_ocean_example.php":3604958191,"Examples\/examples_theme\/no_test_universal_example.php":796897348,"Examples\/examples_pdf\/no_test_pdf417_ex3.php":1761313666,"Examples\/examples_pdf\/no_test_pdf417_ex0.php":653179156,"Examples\/examples_pdf\/no_test_pdf417_ex4.php":59860613,"Examples\/examples_pdf\/no_test_pdf417_ex6.php":2369859154,"Examples\/examples_pdf\/no_test_pdf417_ex1b.php":207890212,"Examples\/examples_pdf\/no_test_pdf417_ex5.php":3844517368,"Examples\/examples_pdf\/no_test_pdf417_ex1.php":891449364,"Examples\/examples_pdf\/no_test_pdf417_ex2.php":1685356711,"Examples\/examples_pdf\/no_test_pdf417_ex1c.php":1986176465,"Examples\/examples_polar\/no_test_polarex1.php":1296996633,"Examples\/examples_polar\/no_test_polarex5.php":1091718513,"Examples\/examples_polar\/no_test_polarex7-2.php":1471455107,"Examples\/examples_polar\/no_test_polarex0-180.php":2135120297,"Examples\/examples_polar\/no_test_polarex8.php":672350420,"Examples\/examples_polar\/no_test_polarex2.php":595026013,"Examples\/examples_polar\/no_test_polarex0.php":3107891689,"Examples\/examples_polar\/no_test_polarex6.php":1683684171,"Examples\/examples_polar\/no_test_polarex9.php":2791325628,"Examples\/examples_polar\/no_test_polarclockex2.php":78235120,"Examples\/examples_polar\/no_test_polarex3.php":156194026,"Examples\/examples_polar\/no_test_polarclockex1.php":1322675871,"Examples\/examples_polar\/no_test_polarex10.php":1618448474,"Examples\/examples_polar\/no_test_polarex7.php":207514872,"Examples\/examples_polar\/no_test_polarex3-lin.php":2049947214,"Examples\/examples_polar\/no_test_polarex4.php":3038158070,"Examples\/examples_polar\/no_test_polarex7-1.php":644960011,"Examples\/examples_canvas\/no_test_mkgrad.php":3828217657,"Examples\/examples_canvas\/canvasex06.php":195817165,"Examples\/examples_canvas\/no_test_listfontsex1.php":4014354849,"Examples\/examples_canvas\/no_test_colormaps.php":1774351766,"Examples\/examples_canvas\/no_dim_canvasex04.php":1182455145,"Examples\/examples_canvas\/no_test_text-example2.php":1788319423,"Examples\/examples_canvas\/no_test_textalignex1.php":2635384759,"Examples\/examples_canvas\/canvaspiralex1.php":600796770,"Examples\/examples_canvas\/no_dim_canvasex02.php":3349876122,"Examples\/examples_canvas\/no_dim_canvas_jpgarchex.php":4184833971,"Examples\/examples_canvas\/no_dim_canvasex01.php":1044054967,"Examples\/examples_canvas\/canvasbezierex1.php":4099680178,"Examples\/examples_canvas\/no_dim_canvasex03.php":195167259,"Examples\/examples_canvas\/no_test_textpalignex1.php":4270835890,"Examples\/examples_canvas\/canvasex05.php":1484473510,"Examples\/examples_canvas\/no_test_text-example1.php":4168368303,"Examples\/examples_tick\/no_test_manualtickex1a.php":2051619642,"Examples\/examples_tick\/manualtickex2.php":3183802453,"Examples\/examples_tick\/manualtickex4.php":1538752448,"Examples\/examples_tick\/manualtickex3.php":3131569223,"Examples\/examples_tick\/no_test_manualtickex1.php":2051619642,"Examples\/examples_pie\/pielabelsex2.php":2877341835,"Examples\/examples_pie\/pieex5.php":306482269,"Examples\/examples_pie\/pie3dex5.php":3385397931,"Examples\/examples_pie\/new_pie4.php":801185263,"Examples\/examples_pie\/no_dim_piecex1.php":3034789118,"Examples\/examples_pie\/pieex2.php":1359103791,"Examples\/examples_pie\/pie3dex1.php":2235674627,"Examples\/examples_pie\/pielabelsex1.php":2976246800,"Examples\/examples_pie\/pieex8.php":1321879871,"Examples\/examples_pie\/pieex1.php":1333595670,"Examples\/examples_pie\/pieex9.php":34150411,"Examples\/examples_pie\/pie3dex3.php":1013947903,"Examples\/examples_pie\/no_test_new_pie2.php":1169446891,"Examples\/examples_pie\/pieex4.php":3623421775,"Examples\/examples_pie\/pie3dex2.php":1893664916,"Examples\/examples_pie\/no_test_new_pie3.php":1656518578,"Examples\/examples_pie\/pieex3.php":2783500256,"Examples\/examples_pie\/pie3dex4.php":2941290297,"Examples\/examples_pie\/new_pie1.php":1840988376,"Examples\/examples_pie\/no_dim_piebkgex1.php":2521325153,"Examples\/examples_pie\/pieex6.php":2752357805,"Examples\/examples_pie\/pielabelsex3.php":3392539181,"Examples\/examples_pie\/pieex7.php":3084092962,"Examples\/examples_pie\/no_dim_piecex2.php":3170293041,"Examples\/examples_pie\/pielabelsex4.php":2559857536,"Examples\/examples_pie\/pielabelsex5.php":1134712405,"Examples\/show-source.php":2205315014,"Examples\/listallflags_helper.php":919142844,"Examples\/examples_windrose\/windrose_ex2.php":2191994037,"Examples\/examples_windrose\/no_test_windrose_icon_ex1.php":1929464226,"Examples\/examples_windrose\/windrose_bgimg_ex1.php":2077476522,"Examples\/examples_windrose\/windrose_ex3.php":4136619109,"Examples\/examples_windrose\/windrose_ex6.php":2093352278,"Examples\/examples_windrose\/no_test_windrose_layout_ex1.php":427999568,"Examples\/examples_windrose\/no_test_windrose_ex9.1.php":1532907993,"Examples\/examples_windrose\/windrose_ex1.php":627078462,"Examples\/examples_windrose\/windrose_2plots_ex1.php":2309789044,"Examples\/examples_windrose\/windrose_ex8.php":3576422239,"Examples\/examples_windrose\/windrose_ex9.php":652035893,"Examples\/examples_windrose\/windrose_ex6.1.php":2290225339,"Examples\/examples_windrose\/no_test_windrose_layout_ex0.php":2172711037,"Examples\/examples_windrose\/windrose_ex1b.php":830313558,"Examples\/examples_windrose\/no_test_windrose_ex5.php":751424361,"Examples\/examples_windrose\/windrose_ex8.1.php":3691930218,"Examples\/examples_windrose\/windrose_ex2.1.php":1518019008,"Examples\/examples_windrose\/windrose_ex0.php":290681959,"Examples\/examples_windrose\/windrose_ex7.php":3046149468,"Examples\/examples_windrose\/windrose_ex4.php":3609775638,"Examples\/examples_windrose\/windrose_ex7.1.php":3916361139,"Examples\/examples_scatter\/no_dim_balloonex2.php":287834393,"Examples\/examples_scatter\/scatterlinkex2.php":2227031919,"Examples\/examples_scatter\/pushpinex1.php":1767765534,"Examples\/examples_scatter\/no_dim_balloonex1.php":347208905,"Examples\/examples_scatter\/ccbp_ex2.php":1824643254,"Examples\/examples_scatter\/footerex1.php":1311362458,"Examples\/examples_scatter\/impulsex3.php":1257695415,"Examples\/examples_scatter\/pushpinex2.php":1533059737,"Examples\/examples_scatter\/scatterex1.php":152853821,"Examples\/examples_scatter\/fieldscatterex1.php":1444044830,"Examples\/examples_scatter\/scatterrotex1.php":545188913,"Examples\/examples_scatter\/scatterlinkex3.php":861463241,"Examples\/examples_scatter\/ccbp_ex1.php":3393661902,"Examples\/examples_scatter\/markflagex1.php":4120744803,"Examples\/examples_scatter\/loglogex1.php":228171376,"Examples\/examples_scatter\/impulsex4.php":3267679292,"Examples\/examples_scatter\/scatterlinkex4.php":2901751591,"Examples\/examples_scatter\/scatterlinkex1.php":3799775452,"Examples\/examples_scatter\/impulsex1.php":1566857443,"Examples\/examples_scatter\/impulsex2.php":1088151233,"Examples\/examples_scatter\/bezierex1.php":3110369594,"Examples\/examples_scatter\/scatterex2.php":3005733055,"Examples\/testsuit.php":3668048573,"Examples\/examples_contour\/no_test_contour2_ex2.php":2459247600,"Examples\/examples_contour\/no_test_contour2_ex1.php":981482739,"Examples\/examples_contour\/no_test_contour2_ex6.php":129357057,"Examples\/examples_contour\/basic_contourex04.php":807601954,"Examples\/examples_contour\/basic_contourex01.php":4094743962,"Examples\/examples_contour\/contourex04.php":1272462548,"Examples\/examples_contour\/no_test_contour2_ex5.php":3142652997,"Examples\/examples_contour\/contourex01.php":40533728,"Examples\/examples_contour\/no_test_contour2_ex7.php":1953206750,"Examples\/examples_contour\/basic_contourex02.php":232436014,"Examples\/examples_contour\/no_test_contour2_ex4.php":1814978134,"Examples\/examples_contour\/basic_contourex03-2.php":1528008100,"Examples\/examples_contour\/basic_contourex05.php":458665552,"Examples\/examples_contour\/contourex02.php":1133785378,"Examples\/examples_contour\/contourex05.php":4026332273,"Examples\/examples_contour\/basic_contourex03-1.php":3842796742,"Examples\/examples_contour\/contourex03.php":3617304385,"Examples\/examples_contour\/basic_contourex03-3.php":2524236926,"Examples\/examples_contour\/no_test_contour2_ex3.php":3489276584,"Examples\/examples_general\/example10.php":3174882745,"Examples\/examples_general\/example26.1.php":197698816,"Examples\/examples_general\/example27.2.php":977180396,"Examples\/examples_general\/example3.0.2.php":1346077520,"Examples\/examples_general\/example2.1.php":3720378028,"Examples\/examples_general\/example16.1.php":294316147,"Examples\/examples_general\/example6.1.php":634363460,"Examples\/examples_general\/example15.php":1615616669,"Examples\/examples_general\/example17.php":1187229105,"Examples\/examples_general\/example11.php":1131790983,"Examples\/examples_general\/example2.5.php":2865797794,"Examples\/examples_general\/example4.php":3056884114,"Examples\/examples_general\/example2.php":1806041755,"Examples\/examples_general\/example3.1.1.php":3016129934,"Examples\/examples_general\/example14.php":239532614,"Examples\/examples_general\/example28.1.php":3663890457,"Examples\/examples_general\/example8.php":4237512854,"Examples\/examples_general\/example27.3.php":1703975964,"Examples\/examples_general\/example3.2.1.php":1350252881,"Examples\/examples_general\/example16.6.php":2066834415,"Examples\/examples_general\/example3.php":2951840368,"Examples\/examples_general\/example6.2.php":3806213496,"Examples\/examples_general\/example3.0.3.php":3524232012,"Examples\/examples_general\/example1.2.php":4150333369,"Examples\/examples_general\/example5.1.php":1235116216,"Examples\/examples_general\/example28.3.php":3257985315,"Examples\/examples_general\/example9.1.php":3695771718,"Examples\/examples_general\/example28.php":417892814,"Examples\/examples_general\/example1.php":2232260340,"Examples\/examples_general\/example3.4.php":1141753264,"Examples\/examples_general\/example8.1.php":395235886,"Examples\/examples_general\/example0.php":2586305022,"Examples\/examples_general\/example13.php":1522689567,"Examples\/examples_general\/example1.1.php":4281600870,"Examples\/examples_general\/example9.php":1030641999,"Examples\/examples_general\/example6.php":2220545829,"Examples\/examples_general\/example3.2.php":646046252,"Examples\/examples_general\/example27.1.php":467561123,"Examples\/examples_general\/example0-0.php":3098210804,"Examples\/examples_general\/example3.1.php":2531483109,"Examples\/examples_general\/example7.php":641603508,"Examples\/examples_general\/example27.php":3766605974,"Examples\/examples_general\/example3.4.1.php":3056318719,"Examples\/examples_general\/exampleex9.php":3589847386,"Examples\/examples_general\/example5.php":458485769,"Examples\/examples_general\/example28.2.php":908776881,"Examples\/examples_general\/example26.php":70697565,"Examples\/examples_general\/example9.2.php":3564475383,"Examples\/examples_general\/example16.php":108219588,"Examples\/examples_general\/example3.0.1.php":300343083,"Examples\/examples_general\/example2.6.php":577739563,"Examples\/examples_general\/example3.2.2.php":4222445684,"Examples\/examples_general\/example3.3.php":1036338968,"Examples\/assets\/dataset01.inc.php":2548265494,"Examples\/examples_background\/background_type_ex2.php":964909250,"Examples\/examples_background\/backgroundex02.php":1585042236,"Examples\/examples_background\/background_type_ex4.php":3995349737,"Examples\/examples_background\/background_type_ex3.php":671727064,"Examples\/examples_background\/backgroundex03.php":3949275023,"Examples\/examples_background\/background_type_ex1.php":1624657514,"Examples\/examples_background\/background_type_ex0.php":2828314985,"Examples\/examples_background\/backgroundex01.php":961733504,"Examples\/examples_stock\/no_test_boxstockex2.php":22618235,"Examples\/examples_stock\/no_test_stockex1.php":2504327214,"Examples\/examples_stock\/no_test_stockex2.php":421917430,"Examples\/examples_stock\/no_test_boxstockex1.php":815182589,"Examples\/examples_csim\/mulyaxiscsimex1.php":1223920274,"Examples\/examples_csim\/csim_in_html_ex2.php":308665523,"Examples\/examples_csim\/scatter_csimex1.php":3878790748,"Examples\/examples_csim\/pie_csimex1.php":1849802831,"Examples\/examples_csim\/barcsim_details_omit.php":1533773741,"Examples\/examples_csim\/barline_csimex1.php":2784343901,"Examples\/examples_csim\/no_test_tableex01_csim.php":3666570967,"Examples\/examples_csim\/no_test_ganttcsimex02.php":3801390590,"Examples\/examples_csim\/bar_csimex3.php":885508442,"Examples\/examples_csim\/no_test_matrix_csimex01.php":3398222365,"Examples\/examples_csim\/no_test_tablebarex1_csim.php":1421968646,"Examples\/examples_csim\/bar_csimex1.php":2369040419,"Examples\/examples_csim\/barlinefreq_csimex1.php":1968583233,"Examples\/examples_csim\/titlecsimex01.php":3719257974,"Examples\/examples_csim\/no_test_polar_csimex1.php":238979752,"Examples\/examples_csim\/csim_in_html_ex1.php":1023854077,"Examples\/examples_csim\/no_test_radar_csimex1.php":3557232207,"Examples\/examples_csim\/no_test_piec_csimex1.php":2944673891,"Examples\/examples_csim\/no_test_ganttcsimex01.php":4147141455,"Examples\/examples_csim\/csim_in_html_graph_ex2.php":837827091,"Examples\/examples_csim\/bar_csimex2.php":1123297146,"Examples\/examples_csim\/csim_in_html_graph_ex1.php":4142986477,"Examples\/examples_csim\/imgmarkercsimex1.php":3587561931,"Examples\/examples_csim\/barcsim_popup.php":210830216,"Examples\/examples_csim\/pie3d_csimex1.php":2795521147,"Examples\/examples_csim\/no_test_boxstockcsimex1.php":264762106,"Examples\/examples_bar\/no_dim_horizbarex6.php":2252417334,"Examples\/examples_bar\/plotbanddensity_ex2.php":3790650336,"Examples\/examples_bar\/example20.5.php":1282086800,"Examples\/examples_bar\/example18.php":1264746378,"Examples\/examples_bar\/barimg1.php":1942050932,"Examples\/examples_bar\/barlinealphaex1.php":2875478547,"Examples\/examples_bar\/no_test_new_bar4.php":1669068907,"Examples\/examples_bar\/accbarframeex01.php":2467119181,"Examples\/examples_bar\/groupbar1.php":2478530539,"Examples\/examples_bar\/manual_textscale_ex3.php":1537456455,"Examples\/examples_bar\/plotbanddensity_ex1.php":2235514895,"Examples\/examples_bar\/example20.4.php":1235147523,"Examples\/examples_bar\/manual_textscale_ex2.php":2174302262,"Examples\/examples_bar\/no_dim_bartutex5.php":1500710743,"Examples\/examples_bar\/bargradsmallex2.php":2621438718,"Examples\/examples_bar\/example16.2.php":1537815413,"Examples\/examples_bar\/barscalecallback1.php":3025467883,"Examples\/examples_bar\/example21.php":204937196,"Examples\/examples_bar\/barint2.php":2977887799,"Examples\/examples_bar\/bargradsmallex4.php":743525949,"Examples\/examples_bar\/bargradsmallex1.php":1834427985,"Examples\/examples_bar\/example25.php":459362464,"Examples\/examples_bar\/example25.2.php":1768409189,"Examples\/examples_bar\/accbarex1.php":3400122062,"Examples\/examples_bar\/no_dim_grace_ex0.php":4272858002,"Examples\/examples_bar\/alphabar.php":1204788350,"Examples\/examples_bar\/bargradex2.php":2574052724,"Examples\/examples_bar\/bargradsmallex5.php":1028453530,"Examples\/examples_bar\/bartutex12.php":1411857266,"Examples\/examples_bar\/bartutex1.php":2373949272,"Examples\/examples_bar\/example16.4.php":331923652,"Examples\/examples_bar\/no_dim_grace_ex3.php":2656862688,"Examples\/examples_bar\/no_dim_bartutex6.php":3385569442,"Examples\/examples_bar\/no_dim_horizbarex2.php":3190054222,"Examples\/examples_bar\/example25.1.php":3298201704,"Examples\/examples_bar\/bargradsmallex3.php":383914350,"Examples\/examples_bar\/example20.2.php":1906044946,"Examples\/examples_bar\/bargradex1.php":1265126881,"Examples\/examples_bar\/no_test_new_bar6.php":871182703,"Examples\/examples_bar\/example24.php":2351380079,"Examples\/examples_bar\/barlinefreqex1.php":1089686712,"Examples\/examples_bar\/negbarvalueex01.php":1551525965,"Examples\/examples_bar\/no_dim_logbarex1.php":2595707416,"Examples\/examples_bar\/bargradex5.php":2766696872,"Examples\/examples_bar\/example20.php":916125340,"Examples\/examples_bar\/example19.1.php":4229324732,"Examples\/examples_bar\/horizbarex4.php":3374977254,"Examples\/examples_bar\/example22.php":2369826936,"Examples\/examples_bar\/barint1.php":3189823241,"Examples\/examples_bar\/example19.php":93157972,"Examples\/examples_bar\/example16.5.php":1137464806,"Examples\/examples_bar\/bargradex6.php":3875116124,"Examples\/examples_bar\/new_bar3.php":2694098975,"Examples\/examples_bar\/bargradex3.php":2837882169,"Examples\/examples_bar\/bartut4.php":2248136974,"Examples\/examples_bar\/plotbanddensity_ex0.php":3608011355,"Examples\/examples_bar\/accbarframeex02.php":2052351992,"Examples\/examples_bar\/no_dim_horizbarex3.php":3406692448,"Examples\/examples_bar\/bargradsmallex8.php":2625616257,"Examples\/examples_bar\/barformatcallbackex1.php":947233714,"Examples\/examples_bar\/no_dim_horizbarex1.php":2771902086,"Examples\/examples_bar\/bargradsmallex7.php":1972015481,"Examples\/examples_bar\/example16.3.php":1583172605,"Examples\/examples_bar\/example20.3.php":3113698519,"Examples\/examples_bar\/bargradex4.php":1830716076,"Examples\/examples_bar\/bartut2.php":3159516376,"Examples\/examples_bar\/no_dim_manual_textscale_ex1.php":59064376,"Examples\/examples_bar\/example20.1.php":3441831188,"Examples\/examples_bar\/no_dim_grace_ex2.php":928333612,"Examples\/examples_bar\/no_test_new_bar1.php":2955548988,"Examples\/examples_bar\/manual_textscale_ex4.php":1273824024,"Examples\/examples_bar\/bar2scalesex1.php":2358032354,"Examples\/examples_bar\/barpatternex1.php":2055662462,"Examples\/examples_bar\/bargradsmallex6.php":1025323388,"Examples\/examples_bar\/bartut3.php":390596312,"Examples\/examples_bar\/example23.php":3934794062,"Examples\/examples_bar\/accbarframeex03.php":3851205431,"Examples\/examples_bar\/no_dim_grace_ex1.php":2312631617,"src\/util\/ColorFactory.php":3140602721,"src\/util\/ReadFileData.php":3350937482,"src\/util\/FuncGenerator.php":3703036606,"src\/util\/Rectangle.php":3587206508,"src\/util\/JpGraphErrObject.php":4016378875,"src\/util\/JpGraphError.php":1512645804,"src\/util\/LinearRegression.php":804968809,"src\/util\/ErrMsgText.php":1291668995,"src\/util\/Helper.php":3969180647,"src\/util\/JpGraphException.php":1471512174,"src\/util\/FlagCache.php":3542763406,"src\/util\/RGB.php":2850273642,"src\/util\/Bezier.php":3818467569,"src\/util\/JpGraphErrObjectImg.php":583748749,"src\/util\/DateScaleUtils.php":3216886074,"src\/util\/JpGraphExceptionL.php":865644333,"src\/util\/GanttConstraint.php":2061512579,"src\/util\/Spline.php":4027872753,"src\/util\/DateLocale.php":648192697,"src\/util\/JpgTimer.php":641577480,"src\/image\/Progress.php":2013461903,"src\/image\/HandDigits.php":2229971203,"src\/image\/LinkArrow.php":2982144270,"src\/image\/PredefIcons.php":1985999829,"src\/image\/Footer.php":2627647358,"src\/image\/ImgStreamCache.php":3225426199,"src\/image\/AntiSpam.php":2048354185,"src\/image\/ImgTrans.php":2587841034,"src\/image\/FieldArrow.php":2035169362,"src\/image\/GanttLink.php":1337379502,"src\/image\/ImgData_PushPins.php":3397244454,"src\/image\/RGB.php":3665502169,"src\/image\/ImgData_Bevels.php":3535364110,"src\/image\/ImgData_Squares.php":2559486419,"src\/image\/IconImage.php":1711492112,"src\/image\/ImgData_Diamonds.php":1129745156,"src\/image\/ImgData_Balls.php":359514871,"src\/image\/RotImage.php":3246409653,"src\/image\/ImgData.php":2937191265,"src\/image\/ImgData_Stars.php":4199572547,"src\/image\/DigitalLED74.php":697310959,"src\/image\/Image.php":3325346500,"src\/image\/FlagImages.php":3089353539,"src\/plot\/ContourPlot.php":1717962556,"src\/plot\/RadarPlot.php":1444306828,"src\/plot\/GanttPlotObject.php":1047658576,"src\/plot\/AccLinePlot.php":1771996236,"src\/plot\/WindrosePlot.php":504621157,"src\/plot\/PiePlot.php":760978946,"src\/plot\/IconPlot.php":4161729295,"src\/plot\/PolarPlot.php":588769735,"src\/plot\/GroupBarPlot.php":2376495904,"src\/plot\/Contour.php":1995439400,"src\/plot\/DisplayValue.php":1889928047,"src\/plot\/FieldPlot.php":1015585906,"src\/plot\/PlotBand.php":1668225600,"src\/plot\/PlotMark.php":2306839095,"src\/plot\/LinePlot.php":4243854681,"src\/plot\/GanttVLine.php":4191988736,"src\/plot\/PlotLine.php":3583785886,"src\/plot\/ErrorLinePlot.php":2033808551,"src\/plot\/LegendStyle.php":226840731,"src\/plot\/ErrorPlot.php":3721807635,"src\/plot\/StockPlot.php":3887516212,"src\/plot\/MileStone.php":4091530454,"src\/plot\/ScatterPlot.php":319212338,"src\/plot\/AccBarPlot.php":1283779809,"src\/plot\/Plot.php":2425745613,"src\/plot\/LineErrorPlot.php":3441560700,"src\/plot\/BoxPlot.php":3174173882,"src\/plot\/GanttBar.php":110404054,"src\/plot\/BarPlot.php":3828984625,"src\/plot\/Gradient.php":376836924,"src\/plot\/PiePlotC.php":2592380905,"src\/plot\/PiePlot3D.php":1066462754,"src\/plot\/MeshInterpolate.php":2003779266,"src\/graph\/GanttActivityInfo.php":4155548634,"src\/graph\/PolarAxis.php":3815774976,"src\/graph\/PolarScale.php":4189260685,"src\/graph\/MGraph.php":1691981533,"src\/graph\/LinearTicks.php":3620169215,"src\/graph\/RadarLogTicks.php":3191278230,"src\/graph\/WindrosePlotScale.php":2692246899,"src\/graph\/Ticks.php":804015569,"src\/graph\/Grid.php":1761812627,"src\/graph\/RectPatternDiagCross.php":1448151987,"src\/graph\/RectPatternVert.php":559606471,"src\/graph\/Rectangle.php":2323165976,"src\/graph\/HeaderProperty.php":651332815,"src\/graph\/CanvasScale.php":3997475908,"src\/graph\/LogTicks.php":2012614240,"src\/graph\/RadarGraph.php":3665226639,"src\/graph\/LineProperty.php":1139079749,"src\/graph\/RadarAxis.php":369300090,"src\/graph\/Axis.php":3397156114,"src\/graph\/RectPatternHor.php":1978968014,"src\/graph\/DateScale.php":1210470335,"src\/graph\/PieGraph.php":1712504240,"src\/graph\/RectPatternFactory.php":3353774794,"src\/graph\/PolarGraph.php":2093498811,"src\/graph\/WindroseGraph.php":3355324281,"src\/graph\/RectPattern3DPlane.php":3863500111,"src\/graph\/RectPattern.php":1695980761,"src\/graph\/CCBPGraph.php":395887050,"src\/graph\/SymChar.php":2319874594,"src\/graph\/RadarLinearTicks.php":411453505,"src\/graph\/PolarLogScale.php":191558044,"src\/graph\/RectPatternRDiag.php":2984884177,"src\/graph\/Shape.php":1388763998,"src\/graph\/LogScale.php":1574512280,"src\/graph\/RectPatternLDiag.php":3592889128,"src\/graph\/GanttScale.php":1771783235,"src\/graph\/AxisPrototype.php":617551794,"src\/graph\/Legend.php":1265760412,"src\/graph\/RadarGrid.php":3783989146,"src\/graph\/HorizontalGridLine.php":2418845366,"src\/graph\/GanttGraph.php":2010551766,"src\/graph\/RectPatternCross.php":145884127,"src\/graph\/LinearScale.php":1864256026,"src\/graph\/Graph.php":1727167980,"src\/graph\/CanvasGraph.php":1720715971,"src\/graph\/RectPatternSolid.php":3785383520,"src\/config.inc.php":1954519522,"src\/lang\/en.inc.php":1592535036,"src\/lang\/de.inc.php":1082283900,"src\/lang\/prod.inc.php":2594486484,"src\/themes\/OceanTheme.php":1021330891,"src\/themes\/SoftyTheme.php":580773851,"src\/themes\/GreenTheme.php":2315714254,"src\/themes\/Theme.php":1667201686,"src\/themes\/OrangeTheme.php":2219263393,"src\/themes\/AquaTheme.php":1742830254,"src\/themes\/RoseTheme.php":146948444,"src\/themes\/PastelTheme.php":3225508053,"src\/themes\/UniversalTheme.php":3717056193,"src\/themes\/VividTheme.php":2403954605,"src\/includes\/jpg-config.inc.php":4014338632,"src\/text\/CanvasRectangleText.php":1698806952,"src\/text\/SuperScriptText.php":2452543853,"src\/text\/GTextTable.php":1886574218,"src\/text\/GraphTabTitle.php":1834252555,"src\/text\/LanguageConv.php":2545337786,"src\/text\/TTF.php":2145291101,"src\/text\/TextPropertyBelow.php":4079559916,"src\/text\/TextProperty.php":315495273,"src\/text\/GTextTableCell.php":1709930095,"src\/text\/Text.php":3285053320}}
\ No newline at end of file
+{"php":"7.2.25-1+ubuntu18.04.1+deb.sury.org+1","version":"2.15.0:v2.15.0#adfab51ae979ee8b0fcbc55aa231ec2786cb1f91","indent":" ","lineEnding":"\n","rules":{"no_php4_constructor":true,"php_unit_namespaced":{"target":"6.0"},"php_unit_dedicate_assert":{"target":"5.6"},"php_unit_expectation":{"target":"5.6"},"php_unit_mock":{"target":"5.5"},"php_unit_no_expectation_annotation":{"target":"4.3"},"binary_operator_spaces":{"align_double_arrow":true,"align_equals":true},"blank_line_after_opening_tag":true,"blank_line_before_statement":true,"braces":true,"cast_spaces":true,"class_attributes_separation":{"elements":["method"]},"class_definition":true,"concat_space":{"spacing":"one"},"declare_equal_normalize":true,"function_typehint_space":true,"include":true,"increment_style":true,"lowercase_cast":true,"lowercase_static_reference":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"ensure_fully_multiline":true},"native_function_casing":true,"native_function_type_declaration_casing":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["break","continue","extra","return","throw","use","parenthesis_brace_block","square_brace_block","curly_brace_block"]},"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":{"use":"echo"},"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":true,"no_unneeded_curly_braces":true,"no_unneeded_final_method":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"no_whitespace_in_blank_line":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"php_unit_fqcn_annotation":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_empty_return":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_types":true,"phpdoc_types_order":true,"phpdoc_var_without_name":true,"protected_to_private":true,"return_type_declaration":true,"semicolon_after_instruction":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_class_element_per_statement":{"elements":["property"]},"single_quote":true,"single_trait_insert_per_statement":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"ternary_operator_spaces":true,"trailing_comma_in_multiline_array":true,"trim_array_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"blank_line_after_namespace":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_constants":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"modernize_types_casting":true,"align_multiline_comment":true,"array_syntax":{"syntax":"short"},"combine_consecutive_issets":true,"combine_consecutive_unsets":true,"compact_nullable_typehint":true,"escape_implicit_backslashes":true,"explicit_indirect_variable":true,"explicit_string_variable":true,"final_internal_class":true,"header_comment":{"commentType":"PHPDoc","header":"JPGraph v4.0.0"},"heredoc_to_nowdoc":true,"list_syntax":{"syntax":"long"},"method_chaining_indentation":true,"multiline_comment_opening_closing":true,"no_null_property_initialization":true,"no_short_echo_tag":true,"no_superfluous_elseif":true,"no_unreachable_default_argument_value":true,"no_useless_else":true,"no_useless_return":true,"ordered_imports":true,"php_unit_strict":true,"php_unit_test_annotation":true,"php_unit_test_class_requires_covers":true,"phpdoc_add_missing_param_annotation":true,"phpdoc_order":true,"strict_param":true},"hashes":{"Examples\/examples_axis\/axislabelbkgex05.php":1759485393,"Examples\/examples_axis\/axislabelbkgex07.php":2192521527,"Examples\/examples_axis\/topxaxis.php":3196655853,"Examples\/examples_axis\/axislabelbkgex04.php":50610810,"Examples\/examples_axis\/mulyaxisex1.php":1187126820,"Examples\/examples_axis\/inyaxisex1.php":517396201,"Examples\/examples_axis\/inyaxisex2.php":2364750263,"Examples\/examples_axis\/axislabelbkgex02.php":2056980487,"Examples\/examples_axis\/inyaxisex3.php":1274998304,"Examples\/examples_axis\/axislabelbkgex03.php":87248563,"Examples\/examples_axis\/axislabelbkgex01.php":740044155,"Examples\/examples_axis\/axislabelbkgex06.php":1411831829,"Examples\/examples_axis\/dupyaxisex1.php":3288066482,"Examples\/examples_radar\/no_test_radarex3.php":2779928066,"Examples\/examples_radar\/no_test_radarex6.php":1269764359,"Examples\/examples_radar\/no_test_radarex8.1.php":3302161840,"Examples\/examples_radar\/no_test_radarex5.php":2985686765,"Examples\/examples_radar\/no_test_radarlogex1-aa.php":1198398340,"Examples\/examples_radar\/no_test_radarex2.php":2271679967,"Examples\/examples_radar\/no_test_radarmarkex1.php":117059392,"Examples\/examples_radar\/no_test_radarex6.1.php":4000994083,"Examples\/examples_radar\/no_test_radarex4.php":2110963000,"Examples\/examples_radar\/no_test_radarex1.php":390277548,"Examples\/examples_radar\/no_test_radarlogex2.php":896245536,"Examples\/examples_radar\/no_test_radarex9.php":868610821,"Examples\/examples_radar\/no_test_fixscale_radarex1.php":3669407442,"Examples\/examples_radar\/no_test_radarlogex1.php":728762360,"Examples\/examples_radar\/no_test_radarex7.php":1240293235,"Examples\/examples_radar\/no_test_radarex8.php":3766292693,"Examples\/examples_qr\/no_test_qrexample12.php":969772685,"Examples\/examples_qr\/no_test_qrexample11.php":4076326493,"Examples\/examples_qr\/no_test_qr_template.php":4235038275,"Examples\/examples_qr\/no_test_qrexample03.php":786877606,"Examples\/examples_qr\/no_test_qrexample08.php":4255043824,"Examples\/examples_qr\/no_test_qrexample07.php":4119236108,"Examples\/examples_qr\/no_test_qrexample02.php":2743888955,"Examples\/examples_qr\/no_test_qrexample05.php":3368447682,"Examples\/examples_qr\/no_test_qrexample09.php":2722296159,"Examples\/examples_qr\/no_test_qrexample04.php":1439752972,"Examples\/examples_qr\/no_test_qrexample00.php":694931049,"Examples\/examples_qr\/no_test_qrexample01.php":1329872836,"Examples\/examples_qr\/no_test_qrexample10.php":3234248850,"Examples\/examples_qr\/no_test_qrexample0.php":107337635,"Examples\/examples_qr\/no_test_qrexample06.php":2551538089,"Examples\/examples_tables\/no_test_tableex00.php":1031785484,"Examples\/examples_tables\/no_test_table_vtext.php":2731380737,"Examples\/examples_tables\/no_test_table_mex3.php":2393340785,"Examples\/examples_tables\/no_test_table_howto5.php":136858856,"Examples\/examples_tables\/no_test_table_howto1.php":524519782,"Examples\/examples_tables\/no_test_table_mex1.php":1524590985,"Examples\/examples_tables\/no_test_table_howto7.php":2994249961,"Examples\/examples_tables\/no_test_tableex04.php":3803289147,"Examples\/examples_tables\/no_test_table_howto8.php":3374942483,"Examples\/examples_tables\/no_test_table_howto7.2.php":2994249961,"Examples\/examples_tables\/no_test_table_howto4.php":3204538249,"Examples\/examples_tables\/no_test_tableex05.php":17882985,"Examples\/examples_tables\/no_test_table_flagex1.php":727745378,"Examples\/examples_tables\/no_test_table_howto2.php":609271369,"Examples\/examples_tables\/no_test_table_mex0.php":3382239488,"Examples\/examples_tables\/no_test_table_howto9.php":41051795,"Examples\/examples_tables\/no_test_tableex01.php":81037069,"Examples\/examples_tables\/no_test_table_howto7.1.php":3588625229,"Examples\/examples_tables\/no_test_table_howto3.php":3971965130,"Examples\/examples_tables\/no_test_table_howto6.php":2481349773,"Examples\/examples_tables\/no_test_table_vtext_ex1.php":1160732788,"Examples\/examples_tables\/no_test_table_mex00.php":2340033975,"Examples\/examples_tables\/no_test_tablebarex1.php":2363123125,"Examples\/examples_tables\/no_test_table_mex2.php":628903699,"Examples\/examples_tables\/no_test_tableex03.php":1747401013,"Examples\/examples_tables\/no_test_tableex02.php":1321779093,"Examples\/examples_rotate\/rotex4.php":3170555959,"Examples\/examples_rotate\/rotex0.php":3979600988,"Examples\/examples_rotate\/rotex2.php":3662066651,"Examples\/examples_rotate\/rotex1.php":1095761255,"Examples\/examples_rotate\/rotateex1.php":1796146303,"Examples\/examples_rotate\/rotex3.php":1292114585,"Examples\/examples_rotate\/rotex5.php":524780724,"Examples\/show-example.php":1543080987,"Examples\/checkttf.php":186395781,"Examples\/listallflags.php":960540511,"Examples\/examples_led\/no_test_ledex13.php":2212987444,"Examples\/examples_led\/no_test_ledex14.php":3157904637,"Examples\/examples_led\/no_test_ledex3.php":1668222451,"Examples\/examples_led\/no_test_ledex5.php":2001750537,"Examples\/examples_led\/no_test_ledex4.1.php":2334379830,"Examples\/examples_led\/no_test_ledex7.php":2344991881,"Examples\/examples_led\/no_test_ledex1.php":1218820615,"Examples\/examples_led\/no_test_ledex10.php":1708304390,"Examples\/examples_led\/no_test_ledex6.php":2468077344,"Examples\/examples_led\/no_test_ledex8.php":1109859753,"Examples\/examples_led\/no_test_ledex12.php":3122975372,"Examples\/examples_led\/no_test_ledex_cyrillic2.php":2374151908,"Examples\/examples_led\/no_test_ledex9.php":37746845,"Examples\/examples_led\/no_test_ledex15.php":407349482,"Examples\/examples_led\/no_test_ledex17.php":2884083211,"Examples\/examples_led\/no_test_ledex4.2.php":4216642000,"Examples\/examples_led\/no_test_ledex4.php":3004712005,"Examples\/examples_led\/no_test_ledex16.php":1359061332,"Examples\/examples_led\/no_test_ledex_cyrillic.php":1918769542,"Examples\/examples_led\/no_test_ledex2.php":3600088464,"Examples\/examples_led\/no_test_ledex11.php":723708937,"Examples\/checkgd.php":3059580498,"Examples\/csim_in_html_ex2.php":308665523,"Examples\/examples_img\/imgmarkerex1.php":4025215141,"Examples\/examples_img\/bkgimgflagex1.php":1432504919,"Examples\/examples_img\/no_dim_bkgimgflagex4.php":639197028,"Examples\/examples_img\/no_dim_bkgimgflagex3.php":674431062,"Examples\/examples_img\/no_dim_bkgimgflagex5.php":4187725535,"Examples\/examples_img\/antispamex01.php":1095228719,"Examples\/examples_img\/no_dim_bkgimgflagex2.php":2632392698,"Examples\/examples_odometer\/no_test_odoex09.php":1373413836,"Examples\/examples_odometer\/no_test_odotutex01.php":2467976778,"Examples\/examples_odometer\/no_test_odotutex17.php":1805354633,"Examples\/examples_odometer\/no_test_odotutex03.php":2726243403,"Examples\/examples_odometer\/no_test_odoex03.php":2736833783,"Examples\/examples_odometer\/no_test_odotutex15.php":3107047345,"Examples\/examples_odometer\/no_test_odotutex16.1.php":184926700,"Examples\/examples_odometer\/no_test_odoex011.php":1556909925,"Examples\/examples_odometer\/no_test_odotutex19.php":4237229363,"Examples\/examples_odometer\/no_test_odotutex11.php":1215439613,"Examples\/examples_odometer\/no_test_odoex07.php":2537823154,"Examples\/examples_odometer\/no_test_odoex02.php":2209491339,"Examples\/examples_odometer\/no_test_odotutex14.php":588763063,"Examples\/examples_odometer\/no_test_odotutex12.php":2275149401,"Examples\/examples_odometer\/no_test_odotutex08.php":1564422435,"Examples\/examples_odometer\/no_test_odotutex18.php":2360522070,"Examples\/examples_odometer\/no_test_odotutex06.php":3668681761,"Examples\/examples_odometer\/no_test_odotutex09.php":475402084,"Examples\/examples_odometer\/no_test_odotutex02.php":4134740225,"Examples\/examples_odometer\/no_test_odotutex10.php":1313622312,"Examples\/examples_odometer\/no_test_odoex012.php":1227835858,"Examples\/examples_odometer\/no_test_odotutex04.php":3123660747,"Examples\/examples_odometer\/no_test_odotutex07.php":3449228909,"Examples\/examples_odometer\/no_test_odotutex00.php":556342226,"Examples\/examples_odometer\/no_test_odotutex16.php":976220855,"Examples\/examples_odometer\/no_test_odoex05.php":2400056131,"Examples\/examples_odometer\/no_test_odoex06.php":926447899,"Examples\/examples_odometer\/no_test_odotutex08.1.php":1507518868,"Examples\/examples_odometer\/no_test_odoex01.php":3022935921,"Examples\/examples_odometer\/no_test_odoex04.php":56072471,"Examples\/examples_odometer\/no_test_odoex08.php":2979728819,"Examples\/examples_odometer\/no_test_odoex00.php":1158410692,"Examples\/examples_odometer\/no_test_odotutex13.php":2807240552,"Examples\/examples_odometer\/no_test_odoex010.php":2240472040,"Examples\/examples_matrix\/no_test_matrix_ex04.php":923393043,"Examples\/examples_matrix\/no_test_matrix_ex01.php":50319649,"Examples\/examples_matrix\/no_test_matrixex00.php":863797823,"Examples\/examples_matrix\/no_test_matrix_ex03.php":1615885068,"Examples\/examples_matrix\/no_test_matrix_edgeex02.php":2242296877,"Examples\/examples_matrix\/no_test_matrix_edgeex01.php":2213697297,"Examples\/examples_matrix\/no_test_matrix_ex06.php":3378893491,"Examples\/examples_matrix\/no_test_matrix_layout_ex1.php":3868652052,"Examples\/examples_matrix\/no_test_matrix_ex05.php":3792878701,"Examples\/examples_matrix\/no_test_matrix_ex02.php":566490301,"Examples\/examples_matrix\/no_test_matrix_ex04.2.php":2431139422,"Examples\/examples_matrix\/no_test_matrix_ex04.1.php":3590101168,"Examples\/examples_matrix\/no_test_matrix_ex0.php":2509629825,"Examples\/examples_matrix\/no_test_matrix_introex.php":3728217922,"Examples\/builtinplotmarksex1.php":1124628874,"Examples\/testsuitversus.php":125199041,"Examples\/linlogex1.php":637606420,"Examples\/titleex1.php":3479797644,"Examples\/y2synch2.php":2786114186,"Examples\/checkgd2.php":94287310,"Examples\/show-image.php":1567245115,"Examples\/examples_staticband\/staticbandbarex1.php":973462625,"Examples\/examples_staticband\/staticbandbarex4.php":132178157,"Examples\/examples_staticband\/staticbandbarex3.php":3444208197,"Examples\/examples_staticband\/smallstaticbandsex6.php":1863626661,"Examples\/examples_staticband\/smallstaticbandsex9.php":4119417726,"Examples\/examples_staticband\/smallstaticbandsex7.php":3798958567,"Examples\/examples_staticband\/smallstaticbandsex10.php":3686963739,"Examples\/examples_staticband\/staticbandbarex5.php":3363116429,"Examples\/examples_staticband\/smallstaticbandsex5.php":188485656,"Examples\/examples_staticband\/smallstaticbandsex8.php":47341234,"Examples\/examples_staticband\/staticbandbarex7.php":2696472814,"Examples\/examples_staticband\/smallstaticbandsex4.php":3957622709,"Examples\/examples_staticband\/staticbandbarex2.php":3094921916,"Examples\/examples_staticband\/smallstaticbandsex1.php":2502316746,"Examples\/examples_staticband\/smallstaticbandsex2.php":3260513358,"Examples\/examples_staticband\/smallstaticbandsex3.php":1623869243,"Examples\/examples_staticband\/staticbandbarex6.php":468627645,"Examples\/examples_staticband\/smallstaticbandsex11.php":3686963739,"Examples\/example_list.php":2426909901,"Examples\/new_step1.php":3941253578,"Examples\/examples_date\/datescaleticksex01.php":251848426,"Examples\/examples_date\/dateaxisex1.php":3029450210,"Examples\/examples_date\/dateaxisex3.php":3897228751,"Examples\/examples_date\/dateaxisex4.php":1966174124,"Examples\/examples_date\/dateutilex01.php":2881102358,"Examples\/examples_date\/dateaxisex2.php":1226720100,"Examples\/examples_date\/dateutilex02.php":2676681924,"Examples\/examples_date\/prepaccdata_example.php":3217171289,"Examples\/listfontsex1.php":554142333,"Examples\/colormaps.php":2755782388,"Examples\/examples_line\/gradlinefillex1.php":2620911653,"Examples\/examples_line\/filledgridex1.php":1237207855,"Examples\/examples_line\/linebarex3.php":1659993081,"Examples\/examples_line\/clipping_ex1.php":3009890800,"Examples\/examples_line\/linebarex2.php":194916088,"Examples\/examples_line\/lineimagefillex1.php":3401842299,"Examples\/examples_line\/manscaleex1.php":85037592,"Examples\/examples_line\/filledstepstyleex1.php":3512616519,"Examples\/examples_line\/centeredlineex01.php":3039037006,"Examples\/examples_line\/gradlinefillex3.php":3307293832,"Examples\/examples_line\/funcex2.php":3417639798,"Examples\/examples_line\/builtinplotmarksex1.php":1015401645,"Examples\/examples_line\/no_test_lineiconex2.php":2205950351,"Examples\/examples_line\/linlogex1.php":1764786628,"Examples\/examples_line\/linegraceex.php":2901569442,"Examples\/examples_line\/titleex1.php":2579971906,"Examples\/examples_line\/y2synch2.php":2338214124,"Examples\/examples_line\/no_test_new_line5.php":1362363069,"Examples\/examples_line\/no_dim_plotlineex1.php":2726889594,"Examples\/examples_line\/manscaleex4.php":2070520373,"Examples\/examples_line\/filledline01.php":2898052118,"Examples\/examples_line\/filledlineex01.1.php":1503982005,"Examples\/examples_line\/staticlinebarex1.php":3790771081,"Examples\/examples_line\/no_test_new_line4.php":4001000423,"Examples\/examples_line\/filledlineex03.php":1344006057,"Examples\/examples_line\/manscaleex3.php":299467349,"Examples\/examples_line\/filledlineex01.php":2910439161,"Examples\/examples_line\/new_line3.php":3765582955,"Examples\/examples_line\/no_test_new_line1.php":290807618,"Examples\/examples_line\/funcex3.php":1772328869,"Examples\/examples_line\/y2synch.php":2458932049,"Examples\/examples_line\/no_test_lineiconex1.php":2188757476,"Examples\/examples_line\/centerlinebarex1.php":1514772066,"Examples\/examples_line\/gradlinefillex4.php":1569038092,"Examples\/examples_line\/funcex1.php":838756433,"Examples\/examples_line\/interpolation-growth.php":3887353342,"Examples\/examples_line\/gradlinefillex2.php":3193560947,"Examples\/examples_line\/interpolation-growth-log.php":4017084893,"Examples\/examples_line\/funcex4.php":3510597340,"Examples\/examples_line\/gradbkgex1.php":2144794295,"Examples\/examples_line\/manscaleex2.php":3243711275,"Examples\/examples_line\/timestampex01.php":2357749761,"Examples\/examples_line\/clipping_ex2.php":4145754298,"Examples\/examples_line\/centeredlineex03.php":1195080683,"Examples\/examples_line\/centeredlineex02.php":2842188343,"Examples\/examples_line\/partiallyfilledlineex1.php":850863102,"Examples\/examples_line\/filledlineex02.php":4178104613,"Examples\/examples_line\/no_test_new_line2.php":1896385918,"Examples\/examples_line\/linebarex1.php":4281212603,"Examples\/examples_line\/linebarcentex1.php":1700437391,"Examples\/examples_line\/nullvalueex01.php":781718998,"Examples\/examples_line\/splineex1.php":4236034499,"Examples\/examples_line\/tabtitleex1.php":1182762629,"Examples\/examples_line\/no_test_new_step1.php":2674237061,"Examples\/examples_multigraph\/no_test_combgraphex2.php":1294378824,"Examples\/examples_multigraph\/no_test_comb90dategraphex01.php":2865873836,"Examples\/examples_multigraph\/no_test_combgraphex1.php":34254009,"Examples\/examples_multigraph\/no_test_comb90dategraphex02.php":3161324291,"Examples\/examples_multigraph\/no_test_comb90dategraphex03.php":3276589437,"Examples\/examples_sunspot\/no_test_sunspotsex3.php":4144274901,"Examples\/examples_sunspot\/no_test_sunspotsex1.php":3292199752,"Examples\/examples_sunspot\/no_test_sunspotsex6.php":1099877817,"Examples\/examples_sunspot\/no_test_sunspotsex5.php":2955703050,"Examples\/examples_sunspot\/no_test_sunspotsex4.php":1870331008,"Examples\/examples_sunspot\/no_test_sunspotsex7.php":3084068433,"Examples\/examples_sunspot\/no_test_sunspotsex2.php":123785609,"Examples\/y2synch.php":4204734912,"Examples\/examples_gantt\/ganttex01.php":1215082372,"Examples\/examples_gantt\/gantt_samerowex2.php":3547364152,"Examples\/examples_gantt\/gantt_samerowex1.php":1991848820,"Examples\/examples_gantt\/ganttex07.php":1146745962,"Examples\/examples_gantt\/ganttex11.php":4125242244,"Examples\/examples_gantt\/gantt_textex1.php":1671807939,"Examples\/examples_gantt\/ganttmonthyearex3.php":1129244055,"Examples\/examples_gantt\/ganttconstrainex1.php":915603396,"Examples\/examples_gantt\/gantticonex1.php":3218745056,"Examples\/examples_gantt\/ganttcolumnfontsex01.php":949340152,"Examples\/examples_gantt\/gantthgridex1.php":1587702732,"Examples\/examples_gantt\/ganttex00.php":3476314331,"Examples\/examples_gantt\/ganttmonthyearex1.php":770053665,"Examples\/examples_gantt\/ganttex10.php":2834674357,"Examples\/examples_gantt\/ganttex17.php":2652571129,"Examples\/examples_gantt\/ganttex02.php":2657257655,"Examples\/examples_gantt\/ganttex13-zoom1.php":2509472462,"Examples\/examples_gantt\/ganttex17-flag.php":1169505813,"Examples\/examples_gantt\/ganttex14.php":1428475399,"Examples\/examples_gantt\/ganttex09.php":59319143,"Examples\/examples_gantt\/ganttex13.php":1121934547,"Examples\/examples_gantt\/ganttmonthyearex2.php":1203926037,"Examples\/examples_gantt\/gantthourex1.php":3086091131,"Examples\/examples_gantt\/ganttex_slice.php":4049850033,"Examples\/examples_gantt\/ganttsimpleex1.php":3629417136,"Examples\/examples_gantt\/ganttmonthyearex4.php":2586297529,"Examples\/examples_gantt\/ganttex03.php":1919959434,"Examples\/examples_gantt\/multconstganttex01.php":3477867887,"Examples\/examples_gantt\/ganttex08.php":491255859,"Examples\/examples_gantt\/no_test_ganttex19.php":832935409,"Examples\/examples_gantt\/ganttex30.php":3947180964,"Examples\/examples_gantt\/ganttex04.php":2356731932,"Examples\/examples_gantt\/ganttconstrainex0.php":1561681810,"Examples\/examples_gantt\/ganttex06.php":3930478555,"Examples\/examples_gantt\/ganttex12.php":2296639315,"Examples\/examples_gantt\/ganttex16.php":1149798780,"Examples\/examples_gantt\/ganttex05.php":3407828967,"Examples\/examples_gantt\/ganttex18.php":2945856519,"Examples\/examples_gantt\/ganttconstrainex2.php":502859377,"Examples\/examples_gantt\/ganttex15.php":3944333095,"Examples\/examples_gantt\/ganttex13-zoom2.php":679673189,"Examples\/examples_gantt\/gantthourminex1.php":3041566538,"Examples\/examples_theme\/no_test_fusion_example.php":1477970693,"Examples\/examples_theme\/no_test_theme_example.php":2785919712,"Examples\/examples_theme\/no_test_orange_example.php":3113965687,"Examples\/examples_theme\/no_test_vivid_example.php":4235378347,"Examples\/examples_theme\/no_test_pastel_example.php":803381419,"Examples\/examples_theme\/aqua_example.php":2857346087,"Examples\/examples_theme\/no_test_green_example.php":1958621456,"Examples\/examples_theme\/no_test_rose_example.php":3990444150,"Examples\/examples_theme\/no_test_softy_example.php":1097792985,"Examples\/examples_theme\/no_test_ocean_example.php":1714207412,"Examples\/examples_theme\/no_test_universal_example.php":3060474503,"Examples\/examples_pdf\/no_test_pdf417_ex3.php":1069248813,"Examples\/examples_pdf\/no_test_pdf417_ex0.php":333747031,"Examples\/examples_pdf\/no_test_pdf417_ex4.php":834847587,"Examples\/examples_pdf\/no_test_pdf417_ex6.php":3846353109,"Examples\/examples_pdf\/no_test_pdf417_ex1b.php":1926751413,"Examples\/examples_pdf\/no_test_pdf417_ex5.php":2069768443,"Examples\/examples_pdf\/no_test_pdf417_ex1.php":3910677207,"Examples\/examples_pdf\/no_test_pdf417_ex2.php":2258539167,"Examples\/examples_pdf\/no_test_pdf417_ex1c.php":1311437441,"Examples\/interpolation-growth.php":4227358013,"Examples\/examples_polar\/no_test_polarex1.php":3476832700,"Examples\/examples_polar\/no_test_polarex5.php":583473751,"Examples\/examples_polar\/no_test_polarex7-2.php":3025931135,"Examples\/examples_polar\/no_test_polarex0-180.php":2993891107,"Examples\/examples_polar\/no_test_polarex8.php":308783839,"Examples\/examples_polar\/no_test_polarex2.php":93198711,"Examples\/examples_polar\/no_test_polarex0.php":2611117867,"Examples\/examples_polar\/no_test_polarex6.php":3315399034,"Examples\/examples_polar\/no_test_polarex9.php":2014144154,"Examples\/examples_polar\/no_test_polarclockex2.php":4074280339,"Examples\/examples_polar\/no_test_polarex3.php":2905286776,"Examples\/examples_polar\/no_test_polarclockex1.php":3799449392,"Examples\/examples_polar\/no_test_polarex10.php":1738236400,"Examples\/examples_polar\/no_test_polarex7.php":2330213927,"Examples\/examples_polar\/no_test_polarex3-lin.php":2101040885,"Examples\/examples_polar\/no_test_polarex4.php":1183421867,"Examples\/examples_polar\/no_test_polarex7-1.php":3007685459,"Examples\/interpolation-growth-log.php":2960029069,"Examples\/multconstganttex01.php":4029135318,"Examples\/defined_constants.php":1337884041,"Examples\/titlecsimex01.php":2480049148,"Examples\/gradbkgex1.php":1577152449,"Examples\/examples_canvas\/no_test_mkgrad.php":1269100105,"Examples\/examples_canvas\/canvasex06.php":3234870902,"Examples\/examples_canvas\/no_test_listfontsex1.php":1789332094,"Examples\/examples_canvas\/no_test_colormaps.php":2755782388,"Examples\/examples_canvas\/no_dim_canvasex04.php":398431560,"Examples\/examples_canvas\/no_test_text-example2.php":979869200,"Examples\/examples_canvas\/no_test_textalignex1.php":834689966,"Examples\/examples_canvas\/canvaspiralex1.php":3886284819,"Examples\/examples_canvas\/no_dim_canvasex02.php":974801682,"Examples\/examples_canvas\/no_dim_canvas_jpgarchex.php":3574240344,"Examples\/examples_canvas\/no_dim_canvasex01.php":720063450,"Examples\/examples_canvas\/canvasbezierex1.php":803763363,"Examples\/examples_canvas\/no_dim_canvasex03.php":1516717114,"Examples\/examples_canvas\/no_test_textpalignex1.php":299956668,"Examples\/examples_canvas\/canvasex05.php":163447943,"Examples\/examples_canvas\/no_test_text-example1.php":3085755642,"Examples\/examples_tick\/no_test_manualtickex1a.php":4137788383,"Examples\/examples_tick\/manualtickex2.php":4280833958,"Examples\/examples_tick\/manualtickex4.php":1713343115,"Examples\/examples_tick\/manualtickex3.php":124771253,"Examples\/examples_tick\/no_test_manualtickex1.php":4137788383,"Examples\/antispamex01.php":1598694200,"Examples\/dataset01.inc.php":2020456451,"Examples\/examples_pie\/pielabelsex2.php":1138740966,"Examples\/examples_pie\/pieex5.php":817796906,"Examples\/examples_pie\/pie3dex5.php":2980736342,"Examples\/examples_pie\/new_pie4.php":3963717405,"Examples\/examples_pie\/no_dim_piecex1.php":4093686262,"Examples\/examples_pie\/pieex2.php":846884926,"Examples\/examples_pie\/pie3dex1.php":1685554085,"Examples\/examples_pie\/pielabelsex1.php":859228868,"Examples\/examples_pie\/pieex8.php":331280339,"Examples\/examples_pie\/pieex1.php":170067650,"Examples\/examples_pie\/pieex9.php":375920002,"Examples\/examples_pie\/pie3dex3.php":1239584783,"Examples\/examples_pie\/no_test_new_pie2.php":1111064030,"Examples\/examples_pie\/pieex4.php":3691984784,"Examples\/examples_pie\/pie3dex2.php":2981977779,"Examples\/examples_pie\/no_test_new_pie3.php":4181096205,"Examples\/examples_pie\/pieex3.php":3188672769,"Examples\/examples_pie\/pie3dex4.php":1525666052,"Examples\/examples_pie\/new_pie1.php":3304509446,"Examples\/examples_pie\/no_dim_piebkgex1.php":4141445591,"Examples\/examples_pie\/pieex6.php":4207985019,"Examples\/examples_pie\/pielabelsex3.php":1054401861,"Examples\/examples_pie\/pieex7.php":942313430,"Examples\/examples_pie\/no_dim_piecex2.php":2682864962,"Examples\/examples_pie\/pielabelsex4.php":1892376045,"Examples\/examples_pie\/pielabelsex5.php":155046889,"Examples\/show-source.php":2412100822,"Examples\/listallflags_helper.php":2688594178,"Examples\/examples_windrose\/windrose_ex2.php":722786444,"Examples\/examples_windrose\/no_test_windrose_icon_ex1.php":2088692380,"Examples\/examples_windrose\/windrose_bgimg_ex1.php":3636282378,"Examples\/examples_windrose\/windrose_ex3.php":2872135782,"Examples\/examples_windrose\/windrose_ex6.php":720746251,"Examples\/examples_windrose\/no_test_windrose_layout_ex1.php":2990842050,"Examples\/examples_windrose\/no_test_windrose_ex9.1.php":2830761834,"Examples\/examples_windrose\/windrose_ex1.php":1752604901,"Examples\/examples_windrose\/windrose_2plots_ex1.php":1879069593,"Examples\/examples_windrose\/windrose_ex8.php":2412780810,"Examples\/examples_windrose\/windrose_ex9.php":2625093990,"Examples\/examples_windrose\/windrose_ex6.1.php":2657425307,"Examples\/examples_windrose\/no_test_windrose_layout_ex0.php":3669510874,"Examples\/examples_windrose\/windrose_ex1b.php":655064535,"Examples\/examples_windrose\/no_test_windrose_ex5.php":3364912621,"Examples\/examples_windrose\/windrose_ex8.1.php":845526938,"Examples\/examples_windrose\/windrose_ex2.1.php":3136712271,"Examples\/examples_windrose\/windrose_ex0.php":1603376337,"Examples\/examples_windrose\/windrose_ex7.php":203682587,"Examples\/examples_windrose\/windrose_ex4.php":3041752281,"Examples\/examples_windrose\/windrose_ex7.1.php":4257301809,"Examples\/examples_scatter\/no_dim_balloonex2.php":2819914204,"Examples\/examples_scatter\/scatterlinkex2.php":1060656785,"Examples\/examples_scatter\/pushpinex1.php":3070496879,"Examples\/examples_scatter\/no_dim_balloonex1.php":898702682,"Examples\/examples_scatter\/ccbp_ex2.php":1650545822,"Examples\/examples_scatter\/footerex1.php":2734747829,"Examples\/examples_scatter\/impulsex3.php":4053599913,"Examples\/examples_scatter\/pushpinex2.php":2212152005,"Examples\/examples_scatter\/scatterex1.php":377777085,"Examples\/examples_scatter\/fieldscatterex1.php":3913986420,"Examples\/examples_scatter\/scatterrotex1.php":742609488,"Examples\/examples_scatter\/scatterlinkex3.php":3981757883,"Examples\/examples_scatter\/ccbp_ex1.php":3303516134,"Examples\/examples_scatter\/markflagex1.php":3219720758,"Examples\/examples_scatter\/loglogex1.php":3917303968,"Examples\/examples_scatter\/impulsex4.php":649442265,"Examples\/examples_scatter\/scatterlinkex4.php":929654985,"Examples\/examples_scatter\/scatterlinkex1.php":2566955766,"Examples\/examples_scatter\/impulsex1.php":130717718,"Examples\/examples_scatter\/impulsex2.php":1612910437,"Examples\/examples_scatter\/bezierex1.php":3074016665,"Examples\/examples_scatter\/scatterex2.php":2225151047,"Examples\/csim_in_html_ex1.php":1023854077,"Examples\/timestampex01.php":1608271147,"Examples\/testsuit.php":2451475634,"Examples\/examples_contour\/no_test_contour2_ex2.php":777638497,"Examples\/examples_contour\/no_test_contour2_ex1.php":3185786246,"Examples\/examples_contour\/no_test_contour2_ex6.php":2128003828,"Examples\/examples_contour\/basic_contourex04.php":1882550663,"Examples\/examples_contour\/basic_contourex01.php":3268206595,"Examples\/examples_contour\/contourex04.php":3469034161,"Examples\/examples_contour\/no_test_contour2_ex5.php":1955182297,"Examples\/examples_contour\/contourex01.php":4111843231,"Examples\/examples_contour\/no_test_contour2_ex7.php":3418669271,"Examples\/examples_contour\/basic_contourex02.php":1597197162,"Examples\/examples_contour\/no_test_contour2_ex4.php":1704148736,"Examples\/examples_contour\/basic_contourex03-2.php":3565467737,"Examples\/examples_contour\/basic_contourex05.php":3789439518,"Examples\/examples_contour\/contourex02.php":2289658920,"Examples\/examples_contour\/contourex05.php":3156278295,"Examples\/examples_contour\/basic_contourex03-1.php":1555920127,"Examples\/examples_contour\/contourex03.php":2025621558,"Examples\/examples_contour\/basic_contourex03-3.php":801494087,"Examples\/examples_contour\/no_test_contour2_ex3.php":841643900,"Examples\/csim_in_html_graph_ex2.php":84265148,"Examples\/examples_general\/example10.php":3605084193,"Examples\/examples_general\/example26.1.php":1110054587,"Examples\/examples_general\/example27.2.php":1803999579,"Examples\/examples_general\/example3.0.2.php":2932540835,"Examples\/examples_general\/example2.1.php":2080038067,"Examples\/examples_general\/example16.1.php":4111975384,"Examples\/examples_general\/example6.1.php":189714940,"Examples\/examples_general\/example15.php":550626648,"Examples\/examples_general\/example17.php":3765642027,"Examples\/examples_general\/example11.php":2685914773,"Examples\/examples_general\/example2.5.php":894204589,"Examples\/examples_general\/example4.php":3400746439,"Examples\/examples_general\/example2.php":930695723,"Examples\/examples_general\/example3.1.1.php":1252058528,"Examples\/examples_general\/example14.php":2601405424,"Examples\/examples_general\/example28.1.php":4144963577,"Examples\/examples_general\/example8.php":3124716901,"Examples\/examples_general\/example27.3.php":3052046577,"Examples\/examples_general\/example3.2.1.php":4022022753,"Examples\/examples_general\/example16.6.php":3585447504,"Examples\/examples_general\/example3.php":442667314,"Examples\/examples_general\/example6.2.php":2064598227,"Examples\/examples_general\/example3.0.3.php":1686410268,"Examples\/examples_general\/example1.2.php":1990990000,"Examples\/examples_general\/example5.1.php":2771834842,"Examples\/examples_general\/example28.3.php":2969799324,"Examples\/examples_general\/example9.1.php":17918131,"Examples\/examples_general\/example28.php":130300580,"Examples\/examples_general\/example1.php":2157549833,"Examples\/examples_general\/example3.4.php":2195603465,"Examples\/examples_general\/example8.1.php":186060499,"Examples\/examples_general\/example0.php":2831626515,"Examples\/examples_general\/example13.php":37110442,"Examples\/examples_general\/example1.1.php":3511124089,"Examples\/examples_general\/example9.php":2147118250,"Examples\/examples_general\/example6.php":3282181510,"Examples\/examples_general\/example3.2.php":1447071124,"Examples\/examples_general\/example27.1.php":1429093581,"Examples\/examples_general\/example0-0.php":2066946568,"Examples\/examples_general\/example3.1.php":4021802656,"Examples\/examples_general\/example7.php":4045065990,"Examples\/examples_general\/example27.php":2261669287,"Examples\/examples_general\/example3.4.1.php":2219067548,"Examples\/examples_general\/exampleex9.php":1594721471,"Examples\/examples_general\/example5.php":1502876208,"Examples\/examples_general\/example28.2.php":2860494426,"Examples\/examples_general\/example26.php":1441475455,"Examples\/examples_general\/example9.2.php":1377208584,"Examples\/examples_general\/example16.php":3996629462,"Examples\/examples_general\/example3.0.1.php":3278904186,"Examples\/examples_general\/example2.6.php":4004128745,"Examples\/examples_general\/example3.2.2.php":4073282684,"Examples\/examples_general\/example3.3.php":2313044045,"Examples\/assets\/dataset01.inc.php":2020456451,"Examples\/csim_in_html_graph_ex1.php":3041610065,"Examples\/examples_background\/background_type_ex2.php":3597061857,"Examples\/examples_background\/backgroundex02.php":530500674,"Examples\/examples_background\/background_type_ex4.php":3440987253,"Examples\/examples_background\/background_type_ex3.php":1071989076,"Examples\/examples_background\/backgroundex03.php":323890316,"Examples\/examples_background\/background_type_ex1.php":947090104,"Examples\/examples_background\/background_type_ex0.php":274211385,"Examples\/examples_background\/backgroundex01.php":2842538680,"Examples\/examples_stock\/no_test_boxstockex2.php":1038191341,"Examples\/examples_stock\/no_test_stockex1.php":1463289409,"Examples\/examples_stock\/no_test_stockex2.php":2104809252,"Examples\/examples_stock\/no_test_boxstockex1.php":3196081499,"Examples\/nullvalueex01.php":490215382,"Examples\/examples_csim\/mulyaxiscsimex1.php":859126986,"Examples\/examples_csim\/csim_in_html_ex2.php":308665523,"Examples\/examples_csim\/scatter_csimex1.php":3605667389,"Examples\/examples_csim\/pie_csimex1.php":2521371828,"Examples\/examples_csim\/barcsim_details_omit.php":150148336,"Examples\/examples_csim\/barline_csimex1.php":1792710276,"Examples\/examples_csim\/no_test_tableex01_csim.php":3236381968,"Examples\/examples_csim\/no_test_ganttcsimex02.php":1021871128,"Examples\/examples_csim\/bar_csimex3.php":1393937049,"Examples\/examples_csim\/no_test_matrix_csimex01.php":3873151991,"Examples\/examples_csim\/no_test_tablebarex1_csim.php":500557947,"Examples\/examples_csim\/bar_csimex1.php":3056759717,"Examples\/examples_csim\/barlinefreq_csimex1.php":1951608013,"Examples\/examples_csim\/titlecsimex01.php":3482411650,"Examples\/examples_csim\/no_test_polar_csimex1.php":3028181567,"Examples\/examples_csim\/csim_in_html_ex1.php":1023854077,"Examples\/examples_csim\/no_test_radar_csimex1.php":3313163807,"Examples\/examples_csim\/no_test_piec_csimex1.php":3620803832,"Examples\/examples_csim\/no_test_ganttcsimex01.php":1485064227,"Examples\/examples_csim\/csim_in_html_graph_ex2.php":3342568144,"Examples\/examples_csim\/bar_csimex2.php":1224026938,"Examples\/examples_csim\/csim_in_html_graph_ex1.php":3192174498,"Examples\/examples_csim\/imgmarkercsimex1.php":76274080,"Examples\/examples_csim\/barcsim_popup.php":2977205185,"Examples\/examples_csim\/pie3d_csimex1.php":3902599551,"Examples\/examples_csim\/no_test_boxstockcsimex1.php":1615786675,"Examples\/examples_bar\/no_dim_horizbarex6.php":4281058342,"Examples\/examples_bar\/plotbanddensity_ex2.php":2724966724,"Examples\/examples_bar\/example20.5.php":4283182421,"Examples\/examples_bar\/example18.php":2589998003,"Examples\/examples_bar\/barimg1.php":1695995693,"Examples\/examples_bar\/barlinealphaex1.php":3531744531,"Examples\/examples_bar\/no_test_new_bar4.php":267332694,"Examples\/examples_bar\/accbarframeex01.php":4218945349,"Examples\/examples_bar\/groupbar1.php":2850564231,"Examples\/examples_bar\/manual_textscale_ex3.php":2053521905,"Examples\/examples_bar\/plotbanddensity_ex1.php":3872796579,"Examples\/examples_bar\/example20.4.php":1593622196,"Examples\/examples_bar\/manual_textscale_ex2.php":583127958,"Examples\/examples_bar\/no_dim_bartutex5.php":531001653,"Examples\/examples_bar\/bargradsmallex2.php":4036272169,"Examples\/examples_bar\/example16.2.php":739861846,"Examples\/examples_bar\/barscalecallback1.php":4169911871,"Examples\/examples_bar\/example21.php":2885636790,"Examples\/examples_bar\/barint2.php":787676210,"Examples\/examples_bar\/bargradsmallex4.php":4029637921,"Examples\/examples_bar\/bargradsmallex1.php":3077005220,"Examples\/examples_bar\/example25.php":3514703073,"Examples\/examples_bar\/example25.2.php":2572856146,"Examples\/examples_bar\/accbarex1.php":4273822482,"Examples\/examples_bar\/no_dim_grace_ex0.php":1285183608,"Examples\/examples_bar\/alphabar.php":2727084363,"Examples\/examples_bar\/bargradex2.php":619163370,"Examples\/examples_bar\/bargradsmallex5.php":874912562,"Examples\/examples_bar\/bartutex12.php":2268487716,"Examples\/examples_bar\/bartutex1.php":3120234593,"Examples\/examples_bar\/example16.4.php":3471832280,"Examples\/examples_bar\/no_dim_grace_ex3.php":1344888519,"Examples\/examples_bar\/no_dim_bartutex6.php":998457972,"Examples\/examples_bar\/no_dim_horizbarex2.php":1620506080,"Examples\/examples_bar\/example25.1.php":1187219793,"Examples\/examples_bar\/bargradsmallex3.php":709676326,"Examples\/examples_bar\/example20.2.php":2996130725,"Examples\/examples_bar\/bargradex1.php":673433303,"Examples\/examples_bar\/no_test_new_bar6.php":2329583222,"Examples\/examples_bar\/example24.php":4069839189,"Examples\/examples_bar\/barlinefreqex1.php":1579119390,"Examples\/examples_bar\/negbarvalueex01.php":620861965,"Examples\/examples_bar\/no_dim_logbarex1.php":1369665623,"Examples\/examples_bar\/bargradex5.php":613224969,"Examples\/examples_bar\/example20.php":3445898131,"Examples\/examples_bar\/example19.1.php":1500220585,"Examples\/examples_bar\/horizbarex4.php":469018933,"Examples\/examples_bar\/example22.php":1954784550,"Examples\/examples_bar\/barint1.php":3107457505,"Examples\/examples_bar\/example19.php":3491736028,"Examples\/examples_bar\/example16.5.php":3410546084,"Examples\/examples_bar\/bargradex6.php":2040242625,"Examples\/examples_bar\/new_bar3.php":255967884,"Examples\/examples_bar\/bargradex3.php":988195439,"Examples\/examples_bar\/bartut4.php":2658355420,"Examples\/examples_bar\/plotbanddensity_ex0.php":3567323455,"Examples\/examples_bar\/accbarframeex02.php":755924279,"Examples\/examples_bar\/no_dim_horizbarex3.php":666280243,"Examples\/examples_bar\/bargradsmallex8.php":2228730475,"Examples\/examples_bar\/barformatcallbackex1.php":2280534859,"Examples\/examples_bar\/no_dim_horizbarex1.php":2738179777,"Examples\/examples_bar\/bargradsmallex7.php":4096612819,"Examples\/examples_bar\/example16.3.php":1804648743,"Examples\/examples_bar\/example20.3.php":4016924449,"Examples\/examples_bar\/bargradex4.php":2206227269,"Examples\/examples_bar\/bartut2.php":3591510693,"Examples\/examples_bar\/no_dim_manual_textscale_ex1.php":479271997,"Examples\/examples_bar\/example20.1.php":2166797334,"Examples\/examples_bar\/no_dim_grace_ex2.php":3871239530,"Examples\/examples_bar\/no_test_new_bar1.php":2261160551,"Examples\/examples_bar\/manual_textscale_ex4.php":675896381,"Examples\/examples_bar\/bar2scalesex1.php":3921743753,"Examples\/examples_bar\/barpatternex1.php":67093787,"Examples\/examples_bar\/bargradsmallex6.php":2116615247,"Examples\/examples_bar\/bartut3.php":739192445,"Examples\/examples_bar\/example23.php":1090983928,"Examples\/examples_bar\/accbarframeex03.php":4146517148,"Examples\/examples_bar\/no_dim_grace_ex1.php":3020275855,"Examples\/prepaccdata_example.php":3678466055,"Examples\/tabtitleex1.php":818574203,"src\/util\/ColorFactory.php":1052826095,"src\/util\/ReadFileData.php":4049970401,"src\/util\/FuncGenerator.php":3927321571,"src\/util\/Rectangle.php":4280331924,"src\/util\/JpGraphError.php":3155162120,"src\/util\/LinearRegression.php":885847148,"src\/util\/ErrMsgText.php":1668802218,"src\/util\/Constants.php":2814181351,"src\/util\/Helper.php":2354442648,"src\/util\/JpGraphException.php":424501896,"src\/util\/FlagCache.php":3652676929,"src\/util\/Bezier.php":1038694385,"src\/util\/GanttConstraint.php":3624780959,"src\/util\/Spline.php":411438215,"src\/util\/DateLocale.php":657794205,"src\/util\/JpgTimer.php":375733437,"src\/image\/Progress.php":280698706,"src\/image\/HandDigits.php":666372080,"src\/image\/LinkArrow.php":1392962961,"src\/image\/PredefIcons.php":3123717380,"src\/image\/Footer.php":502393418,"src\/image\/ImgStreamCache.php":3787815454,"src\/image\/AntiSpam.php":2651515839,"src\/image\/ImgTrans.php":1106362479,"src\/image\/FieldArrow.php":1666341488,"src\/image\/GanttLink.php":1476270323,"src\/image\/Constants.php":2529609421,"src\/image\/ImgData_PushPins.php":186565683,"src\/image\/RGB.php":44695606,"src\/image\/ImgData_Bevels.php":3609057848,"src\/image\/ImgData_Squares.php":829805429,"src\/image\/IconImage.php":3232973281,"src\/image\/ImgData_Diamonds.php":1737199804,"src\/image\/ImgData_Balls.php":2217751931,"src\/image\/RotImage.php":41572398,"src\/image\/ImgData.php":2031485240,"src\/image\/ImgData_Stars.php":1122775794,"src\/image\/DigitalLED74.php":338923329,"src\/image\/Image.php":3960445376,"src\/image\/FlagImages.php":4202921449,"src\/plot\/ContourPlot.php":769551566,"src\/plot\/RadarPlot.php":3150747146,"src\/plot\/GanttPlotObject.php":678845078,"src\/plot\/AccLinePlot.php":2182914435,"src\/plot\/WindrosePlot.php":2167860690,"src\/plot\/PiePlot.php":3821724407,"src\/plot\/IconPlot.php":3043526833,"src\/plot\/PolarPlot.php":3031217819,"src\/plot\/GroupBarPlot.php":2798316978,"src\/plot\/Contour.php":1091908839,"src\/plot\/DisplayValue.php":3116657967,"src\/plot\/FieldPlot.php":2831449332,"src\/plot\/PlotBand.php":420231876,"src\/plot\/PlotMark.php":2388818461,"src\/plot\/LinePlot.php":1805444293,"src\/plot\/GanttVLine.php":3094051652,"src\/plot\/PlotLine.php":1776900896,"src\/plot\/Constants.php":2425811817,"src\/plot\/ErrorLinePlot.php":3301151053,"src\/plot\/LegendStyle.php":371061796,"src\/plot\/ErrorPlot.php":268766954,"src\/plot\/StockPlot.php":1915748396,"src\/plot\/MileStone.php":4249556177,"src\/plot\/ScatterPlot.php":4266365175,"src\/plot\/AccBarPlot.php":3149444717,"src\/plot\/Plot.php":692455097,"src\/plot\/LineErrorPlot.php":1849425615,"src\/plot\/BoxPlot.php":2281446906,"src\/plot\/GanttBar.php":1689065280,"src\/plot\/BarPlot.php":737038656,"src\/plot\/Gradient.php":509382830,"src\/plot\/PiePlotC.php":2529366385,"src\/plot\/PiePlot3D.php":4193440338,"src\/plot\/MeshInterpolate.php":2837018689,"src\/unused\/DateScaleUtils.php":3785118471,"src\/graph\/GanttActivityInfo.php":3722020196,"src\/graph\/PolarAxis.php":4274578971,"src\/graph\/PolarScale.php":2713178952,"src\/graph\/MGraph.php":504022627,"src\/graph\/LinearTicks.php":953370111,"src\/graph\/RadarLogTicks.php":4071570835,"src\/graph\/WindrosePlotScale.php":476068710,"src\/graph\/Ticks.php":3164348343,"src\/graph\/Grid.php":1302300759,"src\/graph\/RectPatternDiagCross.php":1846729938,"src\/graph\/RectPatternVert.php":3843120523,"src\/graph\/Rectangle.php":890893736,"src\/graph\/HeaderProperty.php":459056962,"src\/graph\/CanvasScale.php":1075692189,"src\/graph\/LogTicks.php":3746450377,"src\/graph\/RadarGraph.php":2158319271,"src\/graph\/LineProperty.php":2785330486,"src\/graph\/RadarAxis.php":2960126205,"src\/graph\/Axis.php":2746556504,"src\/graph\/RectPatternHor.php":1720196803,"src\/graph\/Constants.php":2718037565,"src\/graph\/DateScale.php":810002221,"src\/graph\/PieGraph.php":2172843589,"src\/graph\/RectPatternFactory.php":3111399812,"src\/graph\/PolarGraph.php":1684233987,"src\/graph\/WindroseGraph.php":4016230360,"src\/graph\/RectPattern3DPlane.php":3762076780,"src\/graph\/RectPattern.php":4216970862,"src\/graph\/CCBPGraph.php":260271937,"src\/graph\/SymChar.php":3304748193,"src\/graph\/RadarLinearTicks.php":831007843,"src\/graph\/PolarLogScale.php":2212804544,"src\/graph\/RectPatternRDiag.php":3874896272,"src\/graph\/Shape.php":3180938425,"src\/graph\/LogScale.php":3127907477,"src\/graph\/RectPatternLDiag.php":3910455513,"src\/graph\/GanttScale.php":3551884072,"src\/graph\/AxisPrototype.php":3587289459,"src\/graph\/Legend.php":922178998,"src\/graph\/RadarGrid.php":3017867721,"src\/graph\/HorizontalGridLine.php":560195002,"src\/graph\/GanttGraph.php":3478769082,"src\/graph\/RectPatternCross.php":578882587,"src\/graph\/LinearScale.php":2730172715,"src\/graph\/Graph.php":180064554,"src\/graph\/CanvasGraph.php":3683639043,"src\/graph\/RectPatternSolid.php":1791400224,"src\/config.inc.php":2481474141,"src\/lang\/en.inc.php":312931806,"src\/lang\/de.inc.php":479657751,"src\/lang\/prod.inc.php":4252430346,"src\/themes\/OceanTheme.php":2857323119,"src\/themes\/SoftyTheme.php":613804062,"src\/themes\/GreenTheme.php":147329564,"src\/themes\/Theme.php":1000912975,"src\/themes\/OrangeTheme.php":3603867561,"src\/themes\/AquaTheme.php":2968107384,"src\/themes\/RoseTheme.php":1911953556,"src\/themes\/PastelTheme.php":3733019998,"src\/themes\/UniversalTheme.php":55712916,"src\/themes\/VividTheme.php":3825538192,"src\/includes\/polyfills.php":2638163207,"src\/includes\/_font.constants.php":1068117750,"src\/includes\/_general.constants.php":4239026716,"src\/includes\/all_constants.php":76481714,"src\/includes\/_cache.constants.php":1905219645,"src\/includes\/_format.constants.php":1307015972,"src\/text\/CanvasRectangleText.php":2498730544,"src\/text\/SuperScriptText.php":97491044,"src\/text\/GTextTable.php":3842679379,"src\/text\/GraphTabTitle.php":2073973059,"src\/text\/LanguageConv.php":938304366,"src\/text\/Constants.php":3709973571,"src\/text\/TTF.php":1003664220,"src\/text\/TextPropertyBelow.php":3000650346,"src\/text\/TextProperty.php":2796195837,"src\/text\/GTextTableCell.php":2864120085,"src\/text\/Text.php":4291034488}}
\ No newline at end of file
diff --git a/.phpcs.config.xml b/.phpcs.config.xml
new file mode 100644
index 00000000..6da5f780
--- /dev/null
+++ b/.phpcs.config.xml
@@ -0,0 +1,453 @@
+
+
diff --git a/Examples/examples_csim/csim_in_html_ex2.php b/Examples/examples_csim/csim_in_html_ex2.php index 9d08c719..b7cc865e 100755 --- a/Examples/examples_csim/csim_in_html_ex2.php +++ b/Examples/examples_csim/csim_in_html_ex2.php @@ -6,7 +6,7 @@ $_graphfilename1 = 'csim_in_html_graph_ex1.php'; $_graphfilename2 = 'csim_in_html_graph_ex2.php'; -// This is the filename of this HTML file +// This is the filename of this Graph\Configs::getConfig('HTML') file global $_wrapperfilename; $_wrapperfilename = basename(__FILE__); @@ -26,7 +26,7 @@ ?> -
+
'; ?> -
First we need to get hold of the image maps and include them in the HTML +
First we need to get hold of the image maps and include them in the Graph\Configs::getConfig('HTML') page.
For these graphs the maps are:
-
Figure 1. The included Bar CSIM graph.
+
Figure 1. The included Bar Graph\Configs::getConfig('CSIM') graph.
diff --git a/Examples/examples_csim/csim_in_html_graph_ex1.php b/Examples/examples_csim/csim_in_html_graph_ex1.php old mode 100755 new mode 100644 index f2c2278a..42eb6e18 --- a/Examples/examples_csim/csim_in_html_graph_ex1.php +++ b/Examples/examples_csim/csim_in_html_graph_ex1.php @@ -1,7 +1,7 @@ SetCSIMTargets($targ, $alt, $wtarg); $graph->Add($bplot); - -$graph->title->Set('Multiple Image maps'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Multiple Image maps'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetCSIMTarget('#45', 'Title for Bar', '_blank'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->title->SetCSIMTarget('#55', 'Y-axis title'); $graph->yaxis->title->Set('Y-title'); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->SetCSIMTarget('#55', 'X-axis title'); $graph->xaxis->title->Set('X-title'); diff --git a/Examples/examples_csim/csim_in_html_graph_ex2.php b/Examples/examples_csim/csim_in_html_graph_ex2.php old mode 100755 new mode 100644 index 4d98543d..17e95897 --- a/Examples/examples_csim/csim_in_html_graph_ex2.php +++ b/Examples/examples_csim/csim_in_html_graph_ex2.php @@ -1,14 +1,14 @@ SetFrame(false); // Setup title -$piegraph->title->Set('CSIM Center Pie plot'); -$piegraph->title->SetFont(FF_ARIAL, FS_BOLD, 18); +$example_title = 'CSIM Center Pie plot'; +$piegraph->title->set($example_title); +$piegraph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 18); $piegraph->title->SetMargin(8); // Add a little bit more margin from the top // Create the pie plot @@ -40,18 +41,18 @@ $p1->SetSize(0.32); // Label font and color setup -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $p1->value->SetColor('white'); // Setup the title on the center circle $p1->midtitle->Set("Distribution\n2008 H1"); -$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 12); +$p1->midtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // Set color for mid circle $p1->SetMidColor('yellow'); // Use percentage values in the legends values (This is also the default) -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); // The label array values may have printf() formatting in them. The argument to the // form,at string will be the value of the slice (either the percetage or absolute @@ -66,7 +67,7 @@ // Explode all slices 15 pixels $p1->ExplodeAll(15); -// Setup the CSIM targets +// Setup the Graph\Configs::getConfig('CSIM') targets global $_wrapperfilename; $targ = []; $alt = []; diff --git a/Examples/examples_csim/imgmarkercsimex1.php b/Examples/examples_csim/imgmarkercsimex1.php old mode 100755 new mode 100644 index 193e1030..04947fe4 --- a/Examples/examples_csim/imgmarkercsimex1.php +++ b/Examples/examples_csim/imgmarkercsimex1.php @@ -1,7 +1,7 @@ tabtitle->Set(' Year 2003 '); -$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); +$graph->tabtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 13); $graph->tabtitle->SetColor('darkred', '#E1E1FF'); // Enable X-grid as well @@ -37,14 +37,14 @@ $p1->SetCSIMTargets(['#1', '#2', '#3', '#4', '#5']); // Use an image of favourite car as -$p1->mark->SetType(MARK_IMG, __DIR__ . '/../assets/saab_95.jpg', 0.5); -//$p1->mark->SetType(MARK_SQUARE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_IMG'), __DIR__ . '/../assets/saab_95.jpg', 0.5); +//$p1->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); // Displayes value on top of marker image $p1->value->SetFormat('%d mil'); $p1->value->Show(); $p1->value->SetColor('darkred'); -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); // Increase the margin so that the value is printed avove tje // img marker $p1->value->SetMargin(14); diff --git a/Examples/examples_csim/mulyaxiscsimex1.php b/Examples/examples_csim/mulyaxiscsimex1.php old mode 100755 new mode 100644 index ef7f9b3c..158a661b --- a/Examples/examples_csim/mulyaxiscsimex1.php +++ b/Examples/examples_csim/mulyaxiscsimex1.php @@ -1,7 +1,7 @@ SetMargin(60, 180, 50, 40); $graph->SetMarginColor('white'); -$graph->title->Set('Multi Y-axes with Image Map'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Multi Y-axes with Image Map'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Setup the scales for all axes $graph->SetScale('intlin'); @@ -42,41 +43,41 @@ // Standard Y-axis plot $lp1 = new Plot\LinePlot($datay1); $lp1->SetLegend('2001'); -$lp1->mark->SetType(MARK_DIAMOND); +$lp1->mark->SetType(Graph\Configs::getConfig('MARK_DIAMOND')); $lp1->mark->SetWidth(15); $lp1->mark->SetFillColor('orange'); $lp1->SetCSIMTargets($targ1, $alts1); $graph->yaxis->title->Set('Basic Rate'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->yaxis->title->SetColor('black'); $graph->Add($lp1); // First multi Y-axis plot $lp2 = new Plot\LinePlot($datay2); $lp2->SetLegend('2002'); -$lp2->mark->SetType(MARK_DIAMOND); +$lp2->mark->SetType(Graph\Configs::getConfig('MARK_DIAMOND')); $lp2->mark->SetWidth(15); $lp2->mark->SetFillColor('darkred'); $lp2->SetCSIMTargets($targ2, $alts2); $graph->ynaxis[0]->SetColor('darkred'); $graph->ynaxis[0]->title->Set('Rate A'); -$graph->ynaxis[0]->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->ynaxis[0]->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->ynaxis[0]->title->SetColor('darkred'); $graph->AddY(0, $lp2); // Second multi Y-axis plot $lp3 = new Plot\LinePlot($datay3); $lp3->SetLegend('2003'); -$lp3->mark->SetType(MARK_DIAMOND); +$lp3->mark->SetType(Graph\Configs::getConfig('MARK_DIAMOND')); $lp3->mark->SetWidth(15); $lp3->mark->SetFillColor('darkgreen'); $lp3->SetCSIMTargets($targ3, $alts3); $graph->ynaxis[1]->SetColor('darkgreen'); $graph->ynaxis[1]->title->Set('Rate B'); -$graph->ynaxis[1]->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->ynaxis[1]->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->ynaxis[1]->title->SetColor('darkgreen'); $graph->AddY(1, $lp3); -// Send back the HTML page which will call this script again +// Send back the Graph\Configs::getConfig('HTML') page which will call this script again // to retrieve the image. $graph->StrokeCSIM(); diff --git a/Examples/examples_csim/no_test_boxstockcsimex1.php b/Examples/examples_csim/no_test_boxstockcsimex1.php old mode 100755 new mode 100644 index 2b1ae751..550995ce --- a/Examples/examples_csim/no_test_boxstockcsimex1.php +++ b/Examples/examples_csim/no_test_boxstockcsimex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetMarginColor('lightblue'); -$graph->title->Set('Box Stock chart example'); +$example_title = 'Box Stock chart example'; +$graph->title->set($example_title); // Create a new stock plot $p1 = new BoxPlot($datay); diff --git a/Examples/examples_csim/no_test_ganttcsimex01.php b/Examples/examples_csim/no_test_ganttcsimex01.php old mode 100755 new mode 100644 index 2bd75754..f73fa543 --- a/Examples/examples_csim/no_test_ganttcsimex01.php +++ b/Examples/examples_csim/no_test_ganttcsimex01.php @@ -1,7 +1,7 @@ SetCSIMTarget('#', 'Go back 2'); $bar2->title->SetCSIMTarget('#', 'Go back 2 (title)'); -$graph = new GanttGraph(500); -$graph->title->Set('Example with image map'); -$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); -$graph->scale->week->SetFont(FF_FONT1); +$graph = new GanttGraph(500); +$example_title = 'Example with image map'; +$graph->title->set($example_title); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT1')); $graph->Add([$bar1, $bar2]); diff --git a/Examples/examples_csim/no_test_ganttcsimex02.php b/Examples/examples_csim/no_test_ganttcsimex02.php old mode 100755 new mode 100644 index 8a4f4df2..21d36e0f --- a/Examples/examples_csim/no_test_ganttcsimex02.php +++ b/Examples/examples_csim/no_test_ganttcsimex02.php @@ -1,33 +1,34 @@ title->Set('Example with image map'); -$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); -$graph->scale->week->SetFont(FF_FONT1); +$graph = new GanttGraph(500); +$example_title = 'Example with image map'; +$graph->title->set($example_title); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT1')); $graph->CreateSimple($data, $constrains, $progress); diff --git a/Examples/examples_csim/no_test_matrix_csimex01.php b/Examples/examples_csim/no_test_matrix_csimex01.php old mode 100755 new mode 100644 index 2f35206d..ccc5cf00 --- a/Examples/examples_csim/no_test_matrix_csimex01.php +++ b/Examples/examples_csim/no_test_matrix_csimex01.php @@ -1,7 +1,7 @@ SetBackgroundGradient('lightsteelblue:0.8', 'lightsteelblue:0.3'); -$graph->title->Set('CSIM with matrix'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$example_title = 'CSIM with matrix'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('white'); // Create one matrix plot @@ -57,13 +58,13 @@ // Setup column lablels $mp->collabel->Set($collabels); $mp->collabel->SetSide('top'); -$mp->collabel->SetFont(FF_ARIAL, FS_NORMAL, 8); +$mp->collabel->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $mp->collabel->SetFontColor('lightgray'); // Setup row lablels $mp->rowlabel->Set($rowlabels); $mp->rowlabel->SetSide('right'); -$mp->rowlabel->SetFont(FF_ARIAL, FS_NORMAL, 8); +$mp->rowlabel->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $mp->rowlabel->SetFontColor('lightgray'); $mp->rowlabel->SetCSIMTargets($rowlabeltargets); @@ -72,7 +73,7 @@ // Move the legend more to the right $mp->legend->SetMargin(90); $mp->legend->SetColor('white'); -$mp->legend->SetFont(FF_VERDANA, FS_BOLD, 10); +$mp->legend->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 10); $mp->SetCSIMTargets($csimtargets); diff --git a/Examples/examples_csim/no_test_piec_csimex1.php b/Examples/examples_csim/no_test_piec_csimex1.php old mode 100755 new mode 100644 index bca2f4c9..6ed77e47 --- a/Examples/examples_csim/no_test_piec_csimex1.php +++ b/Examples/examples_csim/no_test_piec_csimex1.php @@ -1,7 +1,7 @@ SetShadow(); // Setup title -$graph->title->Set('CSIM Center Pie plot ex 1'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 18); +$example_title = 'CSIM Center Pie plot ex 1'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 18); $graph->title->SetMargin(8); // Add a little bit more margin from the top // Create the pie plot @@ -39,18 +40,18 @@ $p1->SetCenter(0.5, 0.45); // Label font and color setup -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $p1->value->SetColor('white'); // Setup the title on the center circle $p1->midtitle->Set("Test mid\nRow 1\nRow 2"); -$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 14); +$p1->midtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 14); // Set color for mid circle $p1->SetMidColor('yellow'); // Use percentage values in the legends values (This is also the default) -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); // The label array values may have printf() formatting in them. The argument to the // form,at string will be the value of the slice (either the percetage or absolute @@ -68,7 +69,7 @@ // Explode all slices 15 pixels $p1->ExplodeAll(15); -// Setup the CSIM targets +// Setup the Graph\Configs::getConfig('CSIM') targets $targ = ['piec_csimex1.php#1', 'piec_csimex1.php#2', 'piec_csimex1.php#3', 'piec_csimex1.php#4', 'piec_csimex1.php#5', 'piec_csimex1.php#6', ]; $alts = ['val=%d', 'val=%d', 'val=%d', 'val=%d', 'val=%d', 'val=%d']; @@ -77,7 +78,7 @@ // Setup a small help text in the image $txt = new Text("Note: This is an example of image map. Hold\nyour mouse over the slices to see the values.\nThe URL just points back to this page"); -$txt->SetFont(FF_FONT1, FS_BOLD); +$txt->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $txt->SetPos(0.5, 0.97, 'center', 'bottom'); $txt->SetBox('yellow', 'black'); $txt->SetShadow(); diff --git a/Examples/examples_csim/no_test_polar_csimex1.php b/Examples/examples_csim/no_test_polar_csimex1.php old mode 100755 new mode 100644 index 465ea51d..1a94521f --- a/Examples/examples_csim/no_test_polar_csimex1.php +++ b/Examples/examples_csim/no_test_polar_csimex1.php @@ -1,7 +1,7 @@ SetScale('log', 100); -$graph->SetType(POLAR_180); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); // Hide frame around graph (by setting width=0) $graph->SetFrame(true, 'white', 1); @@ -40,33 +40,34 @@ $graph->axis->SetColor('black', 'navy', 'darkred'); // Draw the ticks on the bottom side of the radius axis -$graph->axis->SetTickSide(SIDE_DOWN); +$graph->axis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); // Increase the margin for the labels since we changed the // side of the ticks. $graph->axis->SetLabelMargin(6); // Change fonts -$graph->axis->SetFont(FF_ARIAL, FS_NORMAL, 8); -$graph->axis->SetAngleFont(FF_ARIAL, FS_NORMAL, 8); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); +$graph->axis->SetAngleFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); // Setup axis title $graph->axis->SetTitle('Coverage (in meter)', 'middle'); -$graph->axis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Setup graph title -$graph->title->Set('Polar plot #9'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$example_title = 'Polar plot #9'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('navy'); // Setup tab title $graph->tabtitle->Set('Microphone #1'); $graph->tabtitle->SetColor('brown:0.5', 'lightyellow'); -// Setup the polar plot with CSIM targets for the marks +// Setup the polar plot with Graph\Configs::getConfig('CSIM') targets for the marks $p = new PolarPlot($data); $p->SetFillColor('lightblue@0.5'); -$p->mark->SetType(MARK_SQUARE); +$p->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $p->mark->SetWidth(10); $p->SetCSIMTargets($targets); diff --git a/Examples/examples_csim/no_test_radar_csimex1.php b/Examples/examples_csim/no_test_radar_csimex1.php old mode 100755 new mode 100644 index 567509c1..2e3aa8cb --- a/Examples/examples_csim/no_test_radar_csimex1.php +++ b/Examples/examples_csim/no_test_radar_csimex1.php @@ -1,12 +1,11 @@ title->Set('Radar with marks'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$__width = 300; +$__height = 280; +$graph = new Graph\RadarGraph($__width, $__height); +$example_title = 'Radar with marks'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetMargin(10); $graph->SetTitles($titles); @@ -33,16 +32,16 @@ $graph->grid->SetColor('darkgray'); $graph->grid->Show(); -$graph->axis->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $graph->axis->title->SetMargin(5); -$graph->SetGridDepth(DEPTH_BACK); +$graph->SetGridDepth(Graph\Configs::getConfig('DEPTH_BACK')); $graph->SetSize(0.6); -$plot = new RadarPlot($data); +$plot = new \Plot\RadarPlot($data); $plot->SetColor('red@0.2'); $plot->SetLineWeight(2); $plot->SetFillColor('red@0.7'); -$plot->mark->SetType(MARK_IMG_DIAMOND, 'red', 0.6); +$plot->mark->SetType(Graph\Configs::getConfig('MARK_IMG_DIAMOND'), 'red', 0.6); $plot->mark->SetFillColor('darkred'); $plot->SetCSIMTargets($targets, $alts); diff --git a/Examples/examples_csim/no_test_tablebarex1_csim.php b/Examples/examples_csim/no_test_tablebarex1_csim.php old mode 100755 new mode 100644 index 0e5d8316..e9dc2c42 --- a/Examples/examples_csim/no_test_tablebarex1_csim.php +++ b/Examples/examples_csim/no_test_tablebarex1_csim.php @@ -1,12 +1,14 @@ SetScale('textlin'); $graph->SetMarginColor('white'); -// Setup titles and fonts -$graph->title->Set('Bar and table'); -$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 14); +// Setup titles and fonts$example_title='Bar and table'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_NORMAL'), 14); $graph->yaxis->title->Set('Flow'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $graph->yaxis->title->SetMargin(10); // Create the bars and the accbar plot @@ -52,21 +53,21 @@ $graph->Add($accbplot); //Setup the table -$table = new GTextTable(); +$table = new Text\GTextTable(); $table->Set($datay); $table->SetPos($tablexpos, $tableypos + 1); $table->SetCellCSIMTarget(1, 1, 'tableex02.php', 'View details'); // Basic table formatting -$table->SetFont(FF_ARIAL, FS_NORMAL, 10); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $table->SetAlign('right'); $table->SetMinColWidth($cellwidth); $table->SetNumberFormat('%0.1f'); // Format table header row $table->SetRowFillColor(0, 'teal@0.7'); -$table->SetRowFont(0, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetRowAlign(0, 'center'); // .. and add it to the graph diff --git a/Examples/examples_csim/no_test_tableex01_csim.php b/Examples/examples_csim/no_test_tableex01_csim.php old mode 100755 new mode 100644 index 9ed855a2..1337b614 --- a/Examples/examples_csim/no_test_tableex01_csim.php +++ b/Examples/examples_csim/no_test_tableex01_csim.php @@ -1,7 +1,7 @@ SetCellCSIMTarget(1, 1, 'tableex02.php', 'View details'); -$table->SetRowFont(0, FF_FONT1, FS_BOLD); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $table->SetRowColor(0, 'navy'); $table->SetRowFillColor(0, 'lightgray'); -$table->SetColFont(0, FF_FONT1, FS_BOLD); +$table->SetColFont(0, Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $table->SetColColor(0, 'navy'); $table->SetColFillColor(0, 'lightgray'); diff --git a/Examples/examples_csim/pie3d_csimex1.php b/Examples/examples_csim/pie3d_csimex1.php old mode 100755 new mode 100644 index e133174e..dc47d106 --- a/Examples/examples_csim/pie3d_csimex1.php +++ b/Examples/examples_csim/pie3d_csimex1.php @@ -1,7 +1,7 @@ SetShadow(); -// Set A title for the plot -$graph->title->Set('3D Pie Client side image map'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// Set A title for the plot$example_title='3D Pie Client side image map'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Create $p1 = new Plot\PiePlot3D($data); @@ -40,6 +39,6 @@ $graph->Add($p1); -// Send back the HTML page which will call this script again +// Send back the Graph\Configs::getConfig('HTML') page which will call this script again // to retrieve the image. $graph->StrokeCSIM(); diff --git a/Examples/examples_csim/pie_csimex1.php b/Examples/examples_csim/pie_csimex1.php old mode 100755 new mode 100644 index 0e630a67..b0f5779a --- a/Examples/examples_csim/pie_csimex1.php +++ b/Examples/examples_csim/pie_csimex1.php @@ -1,7 +1,7 @@ SetShadow(); -// Set A title for the plot -$graph->title->Set('Client side image map'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// Set A title for the plot$example_title='Client side image map'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Create $p1 = new Plot\PiePlot($data); @@ -33,6 +32,6 @@ $graph->Add($p1); -// Send back the HTML page which will call this script again +// Send back the Graph\Configs::getConfig('HTML') page which will call this script again // to retrieve the image. $graph->StrokeCSIM(); diff --git a/Examples/examples_csim/scatter_csimex1.php b/Examples/examples_csim/scatter_csimex1.php old mode 100755 new mode 100644 index 47304c2d..ac40f15c --- a/Examples/examples_csim/scatter_csimex1.php +++ b/Examples/examples_csim/scatter_csimex1.php @@ -1,7 +1,7 @@ SetScale('linlin'); //$graph->img->SetMargin(40,40,40,40); - -$graph->title->Set('Scatter plot with Image Map'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Scatter plot with Image Map'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Client side image map targets $targ = ['pie_csimex1.php#1', 'pie_csimex1.php#2', 'pie_csimex1.php#3', @@ -36,7 +36,7 @@ $sp1 = new Plot\ScatterPlot($datay, $datax); // Use diamonds as markerss -$sp1->mark->SetType(MARK_DIAMOND); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_DIAMOND')); $sp1->mark->SetWidth(10); // Set the scatter plot image map targets @@ -45,6 +45,6 @@ // Add the plot $graph->Add($sp1); -// Send back the HTML page which will call this script again +// Send back the Graph\Configs::getConfig('HTML') page which will call this script again // to retrieve the image. $graph->StrokeCSIM(); diff --git a/Examples/examples_csim/titlecsimex01.php b/Examples/examples_csim/titlecsimex01.php old mode 100755 new mode 100644 index e6cd6565..85186fb9 --- a/Examples/examples_csim/titlecsimex01.php +++ b/Examples/examples_csim/titlecsimex01.php @@ -1,14 +1,14 @@ SetShadow(); $bplot->value->SetFormat(' $ %2.1f', 70); -$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$bplot->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $bplot->value->SetColor('blue'); $bplot->value->Show(); @@ -49,7 +49,7 @@ // Create a big "button" that has an image map action $txt1 = new Text\Text("A simple text with\ntwo rows"); -$txt1->SetFont(FF_ARIAL); +$txt1->SetFont(Graph\Configs::getConfig('FF_ARIAL')); $txt1->SetBox('lightblue', 'black', 'white@1', 5); $txt1->SetParagraphAlign('center'); $txt1->SetPos(40, 50); @@ -57,19 +57,18 @@ $graph->Add($txt1); // Add image map to the graph title as well (you can do this to the -// sub- and subsub-title as well) -$graph->title->Set('Image maps barex1'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// sub- and subsub-title as well)$example_title='Image maps barex1'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetCSIMTarget('#45', 'Title for Bar'); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); // Setup the axis title image map and font style -$graph->yaxis->title->SetFont(FF_FONT2, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->title->SetCSIMTarget('#55', 'Y-axis title'); -$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->SetCSIMTarget('#55', 'X-axis title'); -// Send back the HTML page which will call this script again +// Send back the Graph\Configs::getConfig('HTML') page which will call this script again // to retrieve the image. $graph->StrokeCSIM(); diff --git a/Examples/examples_date/dateaxisex1.php b/Examples/examples_date/dateaxisex1.php old mode 100755 new mode 100644 index 2a99248d..fae6a427 --- a/Examples/examples_date/dateaxisex1.php +++ b/Examples/examples_date/dateaxisex1.php @@ -1,7 +1,7 @@ SetScale('datlin', 0, 100); -$graph->title->Set('Example on Date scale'); +$example_title = 'Example on Date scale'; +$graph->title->set($example_title); // Set the angle for the labels to 90 degrees $graph->xaxis->SetLabelAngle(90); diff --git a/Examples/examples_date/dateaxisex3.php b/Examples/examples_date/dateaxisex3.php old mode 100755 new mode 100644 index c99df462..215772c1 --- a/Examples/examples_date/dateaxisex3.php +++ b/Examples/examples_date/dateaxisex3.php @@ -1,7 +1,7 @@ SetScale('datlin', 0, 100); -$graph->title->Set('Example on Date scale'); +$example_title = 'Example on Date scale'; +$graph->title->set($example_title); // Set the angle for the labels to 90 degrees $graph->xaxis->SetLabelAngle(90); // It is possible to adjust the density for the X-axis as well // The following call makes the dates a little more sparse -// $graph->SetTickDensity(TICKD_NORMAL,TICKD_SPARSE); +// $graph->SetTickDensity(Graph\Configs::getConfig('TICKD_NORMAL'),TICKD_SPARSE); // The automatic format string for dates can be overridden // $graph->xaxis->scale->SetDateFormat('h:i'); // Adjust the start/end to a specific alignment -$graph->xaxis->scale->SetTimeAlign(MINADJ_15); +$graph->xaxis->scale->SetTimeAlign(Graph\Configs::getConfig('MINADJ_15')); $line = new Plot\LinePlot($data, $xdata); $line->SetLegend('Year 2005'); diff --git a/Examples/examples_date/dateaxisex4.php b/Examples/examples_date/dateaxisex4.php old mode 100755 new mode 100644 index 244c37de..e6cdc44e --- a/Examples/examples_date/dateaxisex4.php +++ b/Examples/examples_date/dateaxisex4.php @@ -1,7 +1,7 @@ SetScale('datlin', 0, 100); -$graph->title->Set('Example on Date scale'); +$example_title = 'Example on Date scale'; +$graph->title->set($example_title); // Set the angle for the labels to 90 degrees $graph->xaxis->SetLabelAngle(90); @@ -40,7 +41,7 @@ $graph->xaxis->scale->SetDateFormat('H:i'); // Adjust the start/end to a specific alignment -$graph->xaxis->scale->SetTimeAlign(MINADJ_10); +$graph->xaxis->scale->SetTimeAlign(Graph\Configs::getConfig('MINADJ_10')); $line = new Plot\LinePlot($data, $xdata); $line->SetLegend('Year 2005'); diff --git a/Examples/examples_date/datescaleticksex01.php b/Examples/examples_date/datescaleticksex01.php old mode 100755 new mode 100644 index 99b2fd36..da30f7ad --- a/Examples/examples_date/datescaleticksex01.php +++ b/Examples/examples_date/datescaleticksex01.php @@ -1,7 +1,7 @@ SetMargin(80, 30, 50, 40); $graph->SetMarginColor('white'); $graph->SetScale('dateint'); -$graph->title->Set('Current Bids'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Updated every 5 minutes)'); -$graph->subtitle->SetFont(FF_ARIAL, FS_ITALIC, 10); +$example_title = 'Current Bids'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Updated every 5 minutes)'; +$graph->subtitle->Set($subtitle_text); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_ITALIC'), 10); // Enable antialias $graph->img->SetAntiAliasing(); @@ -55,13 +57,13 @@ $graph->xaxis->scale->ticks->Set($INTERVAL); // Adjust the start time for an "even" 5 minute, i.e. 5,10,15,20,25, ... -$graph->xaxis->scale->SetTimeAlign(MINADJ_5); +$graph->xaxis->scale->SetTimeAlign(Graph\Configs::getConfig('MINADJ_5')); // Create the plots using the dummy data created at the beginning $line = []; for ($i = 0; $i < $m; ++$i) { $line[$i] = new Plot\LinePlot($bids[$i], $times); - $line[$i]->mark->SetType(MARK_SQUARE); + $line[$i]->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); } $graph->Add($line); diff --git a/Examples/examples_date/dateutilex01.php b/Examples/examples_date/dateutilex01.php old mode 100755 new mode 100644 index d2a2d240..c221a3cf --- a/Examples/examples_date/dateutilex01.php +++ b/Examples/examples_date/dateutilex01.php @@ -1,18 +1,17 @@ SetMargin(60, 20, 40, 60); // Setup the titles -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->title->Set('Development since 1984'); -$graph->subtitle->SetFont(FF_ARIAL, FS_ITALIC, 10); -$graph->subtitle->Set('(Example using DateScaleUtils class)'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$example_title = 'Development since 1984'; +$graph->title->set($example_title); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_ITALIC'), 10); +$subtitle_text = '(Example using DateScaleUtils class)'; +$graph->subtitle->Set($subtitle_text); // Setup the labels to be correctly format on the X-axis -$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $graph->xaxis->SetLabelAngle(30); // The second paramter set to 'true' will make the library interpret the @@ -39,7 +40,7 @@ $graph->xaxis->SetLabelFormatString('M, Y', true); // Get manual tick every second year -list($tickPos, $minTickPos) = $dateUtils->getTicks($xdata, DSUTILS_YEAR2); +list($tickPos, $minTickPos) = $dateUtils->getTicks($xdata, Graph\Configs::getConfig('DSUTILS_YEAR2')); $graph->xaxis->SetTickPositions($tickPos, $minTickPos); // First add an area plot diff --git a/Examples/examples_date/dateutilex02.php b/Examples/examples_date/dateutilex02.php old mode 100755 new mode 100644 index 2e5ff227..40eaae47 --- a/Examples/examples_date/dateutilex02.php +++ b/Examples/examples_date/dateutilex02.php @@ -1,18 +1,17 @@ SetMargin(60, 20, 40, 60); // Setup the titles -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->title->Set('Development since 1984'); -$graph->subtitle->SetFont(FF_ARIAL, FS_ITALIC, 10); -$graph->subtitle->Set('(Example using the builtin date scale)'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$example_title = 'Development since 1984'; +$graph->title->set($example_title); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_ITALIC'), 10); +$subtitle_text = '(Example using the builtin date scale)'; +$graph->subtitle->Set($subtitle_text); // Setup the labels to be correctly format on the X-axis -$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $graph->xaxis->SetLabelAngle(30); // The second paramter set to 'true' will make the library interpret the diff --git a/Examples/examples_date/prepaccdata_example.php b/Examples/examples_date/prepaccdata_example.php old mode 100755 new mode 100644 index 12c3132c..b977ad17 --- a/Examples/examples_date/prepaccdata_example.php +++ b/Examples/examples_date/prepaccdata_example.php @@ -1,7 +1,7 @@ title->Set('Accumulated values with specified X-axis scale'); +$__width = 600; +$__height = 350; +$graph = new Graph\Graph($__width, $__height); +$example_title = 'Accumulated values with specified X-axis scale'; +$graph->title->set($example_title); $graph->SetScale('textlin'); // Setup margin color @@ -43,8 +44,8 @@ $graph->SetMargin(40, 30, 40, 120); // Turn the tick marks out from the plot area -$graph->xaxis->SetTickSide(SIDE_BOTTOM); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_BOTTOM')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); $p0 = new Plot\LinePlot($ydata[0]); $p0->SetFillColor('sandybrown'); diff --git a/Examples/examples_gantt/gantt_samerowex1.php b/Examples/examples_gantt/gantt_samerowex1.php old mode 100755 new mode 100644 index b8852112..280c99c0 --- a/Examples/examples_gantt/gantt_samerowex1.php +++ b/Examples/examples_gantt/gantt_samerowex1.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Activities on same row'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$example_title = 'Activities on same row'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -39,7 +40,7 @@ $activity1 = new Plot\GanttBar(0, 'Activity 1', '2001-12-21', '2001-12-26', ''); // Yellow diagonal line pattern on a red background -$activity1->SetPattern(BAND_RDIAG, 'yellow'); +$activity1->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity1->SetFillColor('red'); // Set absolute height of activity @@ -50,11 +51,11 @@ $activity2 = new Plot\GanttBar(0, '', '2001-12-31', '2002-01-2', '[BO]'); // ADjust font for caption -$activity2->caption->SetFont(FF_ARIAL, FS_BOLD); +$activity2->caption->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); $activity2->caption->SetColor('darkred'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height of activity diff --git a/Examples/examples_gantt/gantt_samerowex2.php b/Examples/examples_gantt/gantt_samerowex2.php old mode 100755 new mode 100644 index 54eb0419..a8205274 --- a/Examples/examples_gantt/gantt_samerowex2.php +++ b/Examples/examples_gantt/gantt_samerowex2.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Activities on same row'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('Using break style'); +$example_title = 'Activities on same row'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = 'Using break style'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -40,7 +42,7 @@ $activity1 = new Plot\GanttBar(0, 'Activity 1', '2001-12-21', '2001-12-26', ''); // Yellow diagonal line pattern on a red background -$activity1->SetPattern(BAND_RDIAG, 'yellow'); +$activity1->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity1->SetFillColor('red'); // Format the bar for the first activity @@ -55,11 +57,11 @@ $activity2 = new Plot\GanttBar(0, '', '2001-12-31', '2002-01-2', '[BO]'); // ADjust font for caption -$activity2->caption->SetFont(FF_ARIAL, FS_BOLD); +$activity2->caption->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); $activity2->caption->SetColor('darkred'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Finally add the bar to the graph diff --git a/Examples/examples_gantt/gantt_textex1.php b/Examples/examples_gantt/gantt_textex1.php old mode 100755 new mode 100644 index c7d77679..c1ac77af --- a/Examples/examples_gantt/gantt_textex1.php +++ b/Examples/examples_gantt/gantt_textex1.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Example with added texts'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$example_title = 'Example with added texts'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Set table title $graph->scale->tableTitle->Set('(Rev: 1.22)'); -$graph->scale->tableTitle->SetFont(FF_FONT1, FS_BOLD); +$graph->scale->tableTitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->scale->SetTableTitleBackground('silver'); // Modify the appearance of the dividing lines @@ -35,7 +36,7 @@ // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -47,7 +48,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-07', '[50%]'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Set absolute height @@ -55,14 +56,14 @@ // Specify progress to 60% $activity->progress->Set(0.6); -$activity->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Format the bar for the second activity // ($row,$title,$startdate,$enddate) $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2001-12-27', '[30%]'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height @@ -70,7 +71,7 @@ // Specify progress to 30% $activity2->progress->Set(0.3); -$activity2->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity2->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Finally add the bar to the graph $graph->Add($activity); @@ -80,14 +81,14 @@ $txt1 = new Text\Text(); $txt1->SetPos(5, 2); $txt1->Set("Note:\nEstimate done w148"); -$txt1->SetFont(FF_ARIAL, FS_BOLD, 12); +$txt1->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $txt1->SetColor('darkred'); $graph->Add($txt1); // Add text to the top bar $txt2 = new Text\Text(); $txt2->SetScalePos('2002-01-01', 1); -$txt2->SetFont(FF_ARIAL, FS_BOLD, 12); +$txt2->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $txt2->SetAlign('left', 'center'); $txt2->Set('Remember this!'); $txt2->SetBox('yellow'); diff --git a/Examples/examples_gantt/ganttcolumnfontsex01.php b/Examples/examples_gantt/ganttcolumnfontsex01.php old mode 100755 new mode 100644 index e05248b6..7576b343 --- a/Examples/examples_gantt/ganttcolumnfontsex01.php +++ b/Examples/examples_gantt/ganttcolumnfontsex01.php @@ -1,7 +1,7 @@ SetMarginColor('gray:1.7'); $graph->SetColor('white'); -// Setup the graph title and title font -$graph->title->Set('Example of column fonts'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +// Setup the graph title and title font$example_title='Example of column fonts'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); // Show three headers -$graph->ShowHeaders(GANTT_HDAY | GANTT_HMONTH | GANTT_HYEAR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HYEAR')); // Set the column headers and font $graph->scale->actinfo->SetColTitles(['Name', 'Start', 'End'], [100]); -$graph->scale->actinfo->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->scale->actinfo->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); // Some "dummy" data to be dsiplayed $data = [ @@ -42,23 +41,23 @@ $bar = new Plot\GanttBar($data[$i][0], [$data[$i][1], $data[$i][2], $data[$i][3]], $data[$i][2], $data[$i][3], '', 0.35); // For each group make the name bold but keep the dates as the default font - $bar->title->SetColumnFonts([[FF_ARIAL, FS_BOLD, 11]]); + $bar->title->SetColumnFonts([[Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11]]); // Add group markers - $bar->leftMark->SetType(MARK_LEFTTRIANGLE); + $bar->leftMark->SetType(Graph\Configs::getConfig('MARK_LEFTTRIANGLE')); $bar->leftMark->Show(); - $bar->rightMark->SetType(MARK_RIGHTTRIANGLE); + $bar->rightMark->SetType(Graph\Configs::getConfig('MARK_RIGHTTRIANGLE')); $bar->rightMark->Show(); $bar->SetFillColor('black'); - $bar->SetPattern(BAND_SOLID, 'black'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_SOLID'), 'black'); } else { // Format the activity bars $bar = new Plot\GanttBar($data[$i][0], [$data[$i][1], $data[$i][2], $data[$i][3]], $data[$i][2], $data[$i][3], '', 0.45); - $bar->SetPattern(BAND_RDIAG, 'black'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'black'); $bar->SetFillColor('orange'); } // Default font - $bar->title->SetFont(FF_ARIAL, FS_NORMAL, 10); + $bar->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $graph->Add($bar); } diff --git a/Examples/examples_gantt/ganttconstrainex0.php b/Examples/examples_gantt/ganttconstrainex0.php old mode 100755 new mode 100644 index 0666d1b0..a8933aa7 --- a/Examples/examples_gantt/ganttconstrainex0.php +++ b/Examples/examples_gantt/ganttconstrainex0.php @@ -1,7 +1,7 @@ title->Set('Example with grouping and constrains'); +$graph = new Graph\GanttGraph(); +$example_title = 'Example with grouping and constrains'; +$graph->title->set($example_title); // Setup scale -$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAYWNBR')); // Add the specified activities $graph->CreateSimple($data, $constrains, $progress); diff --git a/Examples/examples_gantt/ganttconstrainex1.php b/Examples/examples_gantt/ganttconstrainex1.php old mode 100755 new mode 100644 index d904c300..cfb18f4b --- a/Examples/examples_gantt/ganttconstrainex1.php +++ b/Examples/examples_gantt/ganttconstrainex1.php @@ -1,7 +1,7 @@ title->Set('Example with grouping and constrains'); +$graph = new Graph\GanttGraph(); +$example_title = 'Example with grouping and constrains'; +$graph->title->set($example_title); // Setup scale -$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAYWNBR')); // Add the specified activities $graph->CreateSimple($data, $constrains, $progress); diff --git a/Examples/examples_gantt/ganttconstrainex2.php b/Examples/examples_gantt/ganttconstrainex2.php old mode 100755 new mode 100644 index 4c471b92..651897eb --- a/Examples/examples_gantt/ganttconstrainex2.php +++ b/Examples/examples_gantt/ganttconstrainex2.php @@ -1,7 +1,7 @@ title->Set('Example with grouping and constrains'); +$graph = new Graph\GanttGraph(); +$example_title = 'Example with grouping and constrains'; +$graph->title->set($example_title); //$graph->SetFrame(false); // Setup scale -$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAYWNBR')); // Add the specified activities $graph->CreateSimple($data, $constrains, $progress); diff --git a/Examples/examples_gantt/ganttex00.php b/Examples/examples_gantt/ganttex00.php old mode 100755 new mode 100644 index 1f566435..3ae1a6e4 --- a/Examples/examples_gantt/ganttex00.php +++ b/Examples/examples_gantt/ganttex00.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); // Format the bar for the first activity // ($row,$title,$startdate,$enddate) $activity = new Plot\GanttBar(0, 'Activity 1', '2001-12-21', '2002-01-18'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_LDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_LDIAG'), 'yellow'); $activity->SetFillColor('red'); // Finally add the bar to the graph diff --git a/Examples/examples_gantt/ganttex02.php b/Examples/examples_gantt/ganttex02.php old mode 100755 new mode 100644 index 2deee531..78390ed6 --- a/Examples/examples_gantt/ganttex02.php +++ b/Examples/examples_gantt/ganttex02.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$example_title = 'Main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); // Show day, week and month scale -//$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); -$graph->ShowHeaders(GANTT_HWEEK); +//$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HWEEK')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_WNBR); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_WNBR')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -39,7 +40,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Finally add the bar to the graph diff --git a/Examples/examples_gantt/ganttex03.php b/Examples/examples_gantt/ganttex03.php old mode 100755 new mode 100644 index 954a59d4..d177d1e5 --- a/Examples/examples_gantt/ganttex03.php +++ b/Examples/examples_gantt/ganttex03.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -39,7 +41,7 @@ $activity = new Plot\GanttBar(7, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Finally add the bar to the graph diff --git a/Examples/examples_gantt/ganttex04.php b/Examples/examples_gantt/ganttex04.php old mode 100755 new mode 100644 index 81f44fb8..6f0839f9 --- a/Examples/examples_gantt/ganttex04.php +++ b/Examples/examples_gantt/ganttex04.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -37,7 +39,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Finally add the bar to the graph @@ -45,7 +47,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-09', 'MS5'); -$milestone->caption->SetFont(FF_ARIAL, FS_BOLD, 12); +$milestone->caption->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->Add($milestone); // ... and display it diff --git a/Examples/examples_gantt/ganttex05.php b/Examples/examples_gantt/ganttex05.php old mode 100755 new mode 100644 index 0602187a..1e919287 --- a/Examples/examples_gantt/ganttex05.php +++ b/Examples/examples_gantt/ganttex05.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -37,7 +39,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Finally add the bar to the graph @@ -46,7 +48,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-15', '2002-01-15'); $milestone->title->SetColor('black'); -$milestone->title->SetFont(FF_FONT1, FS_BOLD); +$milestone->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($milestone); // ... and display it diff --git a/Examples/examples_gantt/ganttex06.php b/Examples/examples_gantt/ganttex06.php old mode 100755 new mode 100644 index 9ad80d77..59f4ae80 --- a/Examples/examples_gantt/ganttex06.php +++ b/Examples/examples_gantt/ganttex06.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -37,7 +39,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Finally add the bar to the graph @@ -46,7 +48,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-15', '2002-01-15'); $milestone->title->SetColor('black'); -$milestone->title->SetFont(FF_FONT1, FS_BOLD); +$milestone->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($milestone); // Add a vertical line diff --git a/Examples/examples_gantt/ganttex07.php b/Examples/examples_gantt/ganttex07.php old mode 100755 new mode 100644 index 8e1e5324..db4eb694 --- a/Examples/examples_gantt/ganttex07.php +++ b/Examples/examples_gantt/ganttex07.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -37,7 +39,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Finally add the bar to the graph @@ -46,7 +48,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-15', '2002-01-15'); $milestone->title->SetColor('black'); -$milestone->title->SetFont(FF_FONT1, FS_BOLD); +$milestone->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($milestone); // Add a vertical line diff --git a/Examples/examples_gantt/ganttex08.php b/Examples/examples_gantt/ganttex08.php old mode 100755 new mode 100644 index 93bf7681..37d137b8 --- a/Examples/examples_gantt/ganttex08.php +++ b/Examples/examples_gantt/ganttex08.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -37,17 +39,17 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-15'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Add a right marker $activity->rightMark->Show(); -$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $activity->rightMark->SetWidth(13); $activity->rightMark->SetColor('red'); $activity->rightMark->SetFillColor('red'); $activity->rightMark->title->Set('M5'); -$activity->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$activity->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $activity->rightMark->title->SetColor('white'); // Finally add the bar to the graph @@ -56,7 +58,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-10', '2002-01-10'); $milestone->title->SetColor('black'); -$milestone->title->SetFont(FF_FONT1, FS_BOLD); +$milestone->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($milestone); // Add a vertical line diff --git a/Examples/examples_gantt/ganttex09.php b/Examples/examples_gantt/ganttex09.php old mode 100755 new mode 100644 index 33cb27fe..d769b114 --- a/Examples/examples_gantt/ganttex09.php +++ b/Examples/examples_gantt/ganttex09.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -37,17 +39,17 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Add a right marker $activity->rightMark->Show(); -$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $activity->rightMark->SetWidth(13); $activity->rightMark->SetColor('red'); $activity->rightMark->SetFillColor('red'); $activity->rightMark->title->Set('M5'); -$activity->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$activity->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $activity->rightMark->title->SetColor('white'); // Set absolute height @@ -59,7 +61,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-15', '2002-01-15'); $milestone->title->SetColor('black'); -$milestone->title->SetFont(FF_FONT1, FS_BOLD); +$milestone->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($milestone); // Add a vertical line diff --git a/Examples/examples_gantt/ganttex10.php b/Examples/examples_gantt/ganttex10.php old mode 100755 new mode 100644 index ab727acb..40fdf7e7 --- a/Examples/examples_gantt/ganttex10.php +++ b/Examples/examples_gantt/ganttex10.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -37,17 +39,17 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Add a right marker $activity->rightMark->Show(); -$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $activity->rightMark->SetWidth(13); $activity->rightMark->SetColor('red'); $activity->rightMark->SetFillColor('red'); $activity->rightMark->title->Set('M5'); -$activity->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$activity->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $activity->rightMark->title->SetColor('white'); // Set absolute height @@ -58,17 +60,17 @@ $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Add a right marker $activity2->rightMark->Show(); -$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $activity2->rightMark->SetWidth(13); $activity2->rightMark->SetColor('red'); $activity2->rightMark->SetFillColor('red'); $activity2->rightMark->title->Set('M5'); -$activity2->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$activity2->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $activity2->rightMark->title->SetColor('white'); // Set absolute height @@ -81,7 +83,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-15', '2002-01-15'); $milestone->title->SetColor('black'); -$milestone->title->SetFont(FF_FONT1, FS_BOLD); +$milestone->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($milestone); // Add a vertical line diff --git a/Examples/examples_gantt/ganttex11.php b/Examples/examples_gantt/ganttex11.php old mode 100755 new mode 100644 index dac85213..881d8d7d --- a/Examples/examples_gantt/ganttex11.php +++ b/Examples/examples_gantt/ganttex11.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -37,17 +39,17 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Add a right marker $activity->rightMark->Show(); -$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $activity->rightMark->SetWidth(13); $activity->rightMark->SetColor('red'); $activity->rightMark->SetFillColor('red'); $activity->rightMark->title->Set('M5'); -$activity->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$activity->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $activity->rightMark->title->SetColor('white'); // Set absolute height @@ -58,17 +60,17 @@ $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Add a right marker $activity2->rightMark->Show(); -$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $activity2->rightMark->SetWidth(13); $activity2->rightMark->SetColor('red'); $activity2->rightMark->SetFillColor('red'); $activity2->rightMark->title->Set('M5'); -$activity2->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$activity2->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $activity2->rightMark->title->SetColor('white'); // Set absolute height @@ -81,7 +83,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-15', '2002-01-15'); $milestone->title->SetColor('black'); -$milestone->title->SetFont(FF_FONT1, FS_BOLD); +$milestone->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($milestone); // Add a vertical line diff --git a/Examples/examples_gantt/ganttex12.php b/Examples/examples_gantt/ganttex12.php old mode 100755 new mode 100644 index 90b2f1d6..439348de --- a/Examples/examples_gantt/ganttex12.php +++ b/Examples/examples_gantt/ganttex12.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('A nice main title'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(Draft version)'); +$example_title = 'A nice main title'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(Draft version)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -41,17 +43,17 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Add a right marker $activity->rightMark->Show(); -$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $activity->rightMark->SetWidth(13); $activity->rightMark->SetColor('red'); $activity->rightMark->SetFillColor('red'); $activity->rightMark->title->Set('M5'); -$activity->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$activity->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $activity->rightMark->title->SetColor('white'); // Set absolute height @@ -62,17 +64,17 @@ $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-02-20'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Add a right marker $activity2->rightMark->Show(); -$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $activity2->rightMark->SetWidth(13); $activity2->rightMark->SetColor('red'); $activity2->rightMark->SetFillColor('red'); $activity2->rightMark->title->Set('M5'); -$activity2->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$activity2->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $activity2->rightMark->title->SetColor('white'); // Set absolute height @@ -85,7 +87,7 @@ // Create a miletone $milestone = new Plot\MileStone(2, 'Milestone', '2002-01-15', '2002-01-15'); $milestone->title->SetColor('black'); -$milestone->title->SetFont(FF_FONT1, FS_BOLD); +$milestone->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($milestone); // Add a vertical line diff --git a/Examples/examples_gantt/ganttex13-zoom1.php b/Examples/examples_gantt/ganttex13-zoom1.php old mode 100755 new mode 100644 index 7bfa789f..a784dc5e --- a/Examples/examples_gantt/ganttex13-zoom1.php +++ b/Examples/examples_gantt/ganttex13-zoom1.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Zooming a graph'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(zoom=0.7)'); +$example_title = 'Zooming a graph'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(zoom=0.7)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -43,7 +45,7 @@ $activity1 = new Plot\GanttBar(0, 'Activity 1', '2001-12-21', '2002-01-07', '[ER,TR]'); // Yellow diagonal line pattern on a red background -$activity1->SetPattern(BAND_RDIAG, 'yellow'); +$activity1->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity1->SetFillColor('red'); // Set absolute height of activity @@ -54,11 +56,11 @@ $activity2 = new Plot\GanttBar(1, 'Activity 2', '2001-12-21', '2002-01-01', '[BO,SW,JC]'); // ADjust font for caption -$activity2->caption->SetFont(FF_ARIAL, FS_BOLD); +$activity2->caption->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); $activity2->caption->SetColor('darkred'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height of activity diff --git a/Examples/examples_gantt/ganttex13-zoom2.php b/Examples/examples_gantt/ganttex13-zoom2.php old mode 100755 new mode 100644 index 405308f9..d84d32db --- a/Examples/examples_gantt/ganttex13-zoom2.php +++ b/Examples/examples_gantt/ganttex13-zoom2.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Zooming a graph'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(zoom=1.5)'); +$example_title = 'Zooming a graph'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(zoom=1.5)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -43,7 +45,7 @@ $activity1 = new Plot\GanttBar(0, 'Activity 1', '2001-12-21', '2002-01-07', '[ER,TR]'); // Yellow diagonal line pattern on a red background -$activity1->SetPattern(BAND_RDIAG, 'yellow'); +$activity1->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity1->SetFillColor('red'); // Set absolute height of activity @@ -54,11 +56,11 @@ $activity2 = new Plot\GanttBar(1, 'Activity 2', '2001-12-21', '2002-01-01', '[BO,SW,JC]'); // ADjust font for caption -$activity2->caption->SetFont(FF_ARIAL, FS_BOLD); +$activity2->caption->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); $activity2->caption->SetColor('darkred'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height of activity diff --git a/Examples/examples_gantt/ganttex13.php b/Examples/examples_gantt/ganttex13.php old mode 100755 new mode 100644 index 3582203a..d2befa8f --- a/Examples/examples_gantt/ganttex13.php +++ b/Examples/examples_gantt/ganttex13.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Example of captions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(ganttex13.php)'); +$example_title = 'Example of captions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(ganttex13.php)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Instead of week number show the date for the first day in the week // on the week scale -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Make the week scale font smaller than the default -$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR4')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -40,7 +42,7 @@ $activity1 = new Plot\GanttBar(0, 'Activity 1', '2001-12-21', '2002-01-07', '[ER,TR]'); // Yellow diagonal line pattern on a red background -$activity1->SetPattern(BAND_RDIAG, 'yellow'); +$activity1->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity1->SetFillColor('red'); // Set absolute height of activity @@ -51,11 +53,11 @@ $activity2 = new Plot\GanttBar(1, 'Activity 2', '2001-12-21', '2002-01-01', '[BO,SW,JC]'); // ADjust font for caption -$activity2->caption->SetFont(FF_ARIAL, FS_BOLD); +$activity2->caption->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); $activity2->caption->SetColor('darkred'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height of activity diff --git a/Examples/examples_gantt/ganttex14.php b/Examples/examples_gantt/ganttex14.php old mode 100755 new mode 100644 index f02b8be7..b2d0c1b4 --- a/Examples/examples_gantt/ganttex14.php +++ b/Examples/examples_gantt/ganttex14.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Example of captions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(ganttex14.php)'); +$example_title = 'Example of captions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(ganttex14.php)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -34,7 +36,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-07', '[50%]'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Set absolute height @@ -48,7 +50,7 @@ $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-01-02', '[30%]'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height diff --git a/Examples/examples_gantt/ganttex15.php b/Examples/examples_gantt/ganttex15.php old mode 100755 new mode 100644 index 82edf223..aa98ecd2 --- a/Examples/examples_gantt/ganttex15.php +++ b/Examples/examples_gantt/ganttex15.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Example of captions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(ganttex15.php)'); +$example_title = 'Example of captions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(ganttex15.php)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -34,7 +36,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-07', '[50%]'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Set absolute height @@ -42,14 +44,14 @@ // Specify progress to 60% $activity->progress->Set(0.6); -$activity->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Format the bar for the second activity // ($row,$title,$startdate,$enddate) $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-01-02', '[30%]'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height @@ -57,7 +59,7 @@ // Specify progress to 30% $activity2->progress->Set(0.3); -$activity2->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity2->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Finally add the bar to the graph $graph->Add($activity); diff --git a/Examples/examples_gantt/ganttex16.php b/Examples/examples_gantt/ganttex16.php old mode 100755 new mode 100644 index 7ab91c55..7d5d6017 --- a/Examples/examples_gantt/ganttex16.php +++ b/Examples/examples_gantt/ganttex16.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Example of captions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(ganttex16.php)'); +$example_title = 'Example of captions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(ganttex16.php)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Set table title $graph->scale->tableTitle->Set('(Rev: 1.22)'); -$graph->scale->tableTitle->SetFont(FF_FONT1, FS_BOLD); +$graph->scale->tableTitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->scale->SetTableTitleBackground('silver'); $graph->scale->tableTitle->Show(); // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -40,7 +42,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-07', '[50%]'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Set absolute height @@ -48,14 +50,14 @@ // Specify progress to 60% $activity->progress->Set(0.6); -$activity->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Format the bar for the second activity // ($row,$title,$startdate,$enddate) $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-01-02', '[30%]'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height @@ -63,7 +65,7 @@ // Specify progress to 30% $activity2->progress->Set(0.3); -$activity2->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity2->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Finally add the bar to the graph $graph->Add($activity); diff --git a/Examples/examples_gantt/ganttex17-flag.php b/Examples/examples_gantt/ganttex17-flag.php old mode 100755 new mode 100644 index 16b8688a..41cc0558 --- a/Examples/examples_gantt/ganttex17-flag.php +++ b/Examples/examples_gantt/ganttex17-flag.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Example of captions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(ganttex17.php)'); +$example_title = 'Example of captions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(ganttex17.php)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Set table title $graph->scale->tableTitle->Set('(Rev: 1.22)'); -$graph->scale->tableTitle->SetFont(FF_FONT1, FS_BOLD); +$graph->scale->tableTitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->scale->SetTableTitleBackground('silver'); // Modify the appearance of the dividing lines @@ -33,7 +35,7 @@ // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -45,7 +47,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-07', '[50%]'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Set absolute height @@ -53,14 +55,14 @@ // Specify progress to 60% $activity->progress->Set(0.6); -$activity->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Format the bar for the second activity // ($row,$title,$startdate,$enddate) $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-01-02', '[30%]'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height @@ -68,7 +70,7 @@ // Specify progress to 30% $activity2->progress->Set(0.3); -$activity2->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity2->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Finally add the bar to the graph $graph->Add($activity); diff --git a/Examples/examples_gantt/ganttex17.php b/Examples/examples_gantt/ganttex17.php old mode 100755 new mode 100644 index 874c0456..fc75518b --- a/Examples/examples_gantt/ganttex17.php +++ b/Examples/examples_gantt/ganttex17.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Example of captions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(ganttex17.php)'); +$example_title = 'Example of captions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(ganttex17.php)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Set table title $graph->scale->tableTitle->Set('(Rev: 1.22)'); -$graph->scale->tableTitle->SetFont(FF_FONT1, FS_BOLD); +$graph->scale->tableTitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->scale->SetTableTitleBackground('silver'); // Modify the appearance of the dividing lines @@ -35,7 +37,7 @@ // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -47,7 +49,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-07', '[50%]'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Set absolute height @@ -55,14 +57,14 @@ // Specify progress to 60% $activity->progress->Set(0.6); -$activity->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Format the bar for the second activity // ($row,$title,$startdate,$enddate) $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-01-02', '[30%]'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height @@ -70,7 +72,7 @@ // Specify progress to 30% $activity2->progress->Set(0.3); -$activity2->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity2->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Finally add the bar to the graph $graph->Add($activity); diff --git a/Examples/examples_gantt/ganttex18.php b/Examples/examples_gantt/ganttex18.php old mode 100755 new mode 100644 index 923a520b..666a9a92 --- a/Examples/examples_gantt/ganttex18.php +++ b/Examples/examples_gantt/ganttex18.php @@ -1,7 +1,7 @@ SetShadow(); // Add title and subtitle -$graph->title->Set('Example of captions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(ganttex18.php)'); +$example_title = 'Example of captions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(ganttex18.php)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Set table title $graph->scale->tableTitle->Set('(Rev: 1.22)'); -$graph->scale->tableTitle->SetFont(FF_FONT1, FS_BOLD); +$graph->scale->tableTitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->scale->SetTableTitleBackground('silver'); // Modify the appearance of the dividing lines @@ -36,7 +38,7 @@ // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -48,7 +50,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-07', '[50%]'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Set absolute height @@ -56,14 +58,14 @@ // Specify progress to 60% $activity->progress->Set(0.6); -$activity->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Format the bar for the second activity // ($row,$title,$startdate,$enddate) $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-01-02', '[30%]'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height @@ -71,7 +73,7 @@ // Specify progress to 30% $activity2->progress->Set(0.3); -$activity2->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity2->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Finally add the bar to the graph $graph->Add($activity); diff --git a/Examples/examples_gantt/ganttex30.php b/Examples/examples_gantt/ganttex30.php old mode 100755 new mode 100644 index 079024bb..83dbffae --- a/Examples/examples_gantt/ganttex30.php +++ b/Examples/examples_gantt/ganttex30.php @@ -1,7 +1,7 @@ SetShadow(); $graph->SetBox(); -// Titles for chart -$graph->title->Set('General conversion plan'); -$graph->subtitle->Set('(Revision: 2001-11-18)'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +// Titles for chart$example_title='General conversion plan'; $graph->title->set($example_title); +$subtitle_text = '(Revision: 2001-11-18)'; +$graph->subtitle->Set($subtitle_text); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); // For illustration we enable all headers. -$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); // For the week we choose to show the start date of the week // the default is to show week number (according to ISO 8601) -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Change the scale font -$graph->scale->week->SetFont(FF_FONT0); -$graph->scale->year->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); +$graph->scale->year->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); // Setup some data for the gantt bars $data = [ - [0, 'Group 1', '2001-10-29', '2001-11-27', FF_FONT1, FS_BOLD, 8], + [0, 'Group 1', '2001-10-29', '2001-11-27', Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 8], [1, ' Label 2', '2001-11-8', '2001-12-14'], [2, ' Label 3', '2001-11-01', '2001-11-8'], - [4, 'Group 2', '2001-11-07', '2001-12-19', FF_FONT1, FS_BOLD, 8], + [4, 'Group 2', '2001-11-07', '2001-12-19', Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 8], [5, ' Label 4', '2001-11-8', '2001-12-19'], [6, ' Label 5', '2001-11-01', '2001-11-8'], ]; @@ -52,7 +52,7 @@ // $bar->SetShadow(true,"darkgray"); // For illustration lets make each bar be red with yellow diagonal stripes - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('red'); // To indicate progress each bar can have a smaller bar within @@ -62,15 +62,15 @@ // Each bar may also have optional left and right plot marks // As illustration lets put a filled circle with a number at the end // of each bar - $bar->rightMark->SetType(MARK_FILLEDCIRCLE); + $bar->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $bar->rightMark->SetFillColor('red'); $bar->rightMark->SetColor('red'); $bar->rightMark->SetWidth(10); // Title for the mark - $bar->rightMark->title->Set(strval($i + 1)); + $bar->rightMark->title->Set((string) ($i + 1)); $bar->rightMark->title->SetColor('white'); - $bar->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 10); + $bar->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $bar->rightMark->Show(); // ... and add the bar to the gantt chart @@ -79,7 +79,7 @@ // Create a milestone mark $ms = new Plot\MileStone(7, 'M5', '2001-12-10', '10/12'); -$ms->title->SetFont(FF_FONT1, FS_BOLD); +$ms->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($ms); // Create a vertical line to emphasize the milestone diff --git a/Examples/examples_gantt/gantthgridex1.php b/Examples/examples_gantt/gantthgridex1.php old mode 100755 new mode 100644 index 4d68575e..ff44dbc4 --- a/Examples/examples_gantt/gantthgridex1.php +++ b/Examples/examples_gantt/gantthgridex1.php @@ -1,7 +1,7 @@ title->Set('Grid example'); -$graph->subtitle->Set('(Horizontal grid)'); -$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 14); +$example_title = 'Grid example'; +$graph->title->set($example_title); +$subtitle_text = '(Horizontal grid)'; +$graph->subtitle->Set($subtitle_text); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_NORMAL'), 14); // Specify what headers to show -$graph->ShowHeaders(GANTT_HMONTH | GANTT_HDAY); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); -$graph->scale->week->SetFont(FF_FONT0); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT0')); // Setup a horizontal grid $graph->hgrid->Show(); @@ -37,7 +39,7 @@ if (count($data[$i]) > 4) { $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); } - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('red'); $graph->Add($bar); } @@ -45,13 +47,14 @@ // Setup a vertical marker line $vline = new Plot\GanttVLine('2001-11-01'); $vline->SetDayOffset(0.5); -$vline->title->Set('2001-11-01'); -$vline->title->SetFont(FF_FONT1, FS_BOLD, 10); +$example_title = '2001-11-01'; +$vline->title->set($example_title); +$vline->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->Add($vline); // Setup a milestone $ms = new Plot\MileStone(6, 'M5', '2001-11-28', '28/12'); -$ms->title->SetFont(FF_FONT1, FS_BOLD); +$ms->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($ms); // And to show that you can also add an icon we add "Tux" diff --git a/Examples/examples_gantt/gantthourex1.php b/Examples/examples_gantt/gantthourex1.php old mode 100755 new mode 100644 index 0164b5ab..0a9c4f4a --- a/Examples/examples_gantt/gantthourex1.php +++ b/Examples/examples_gantt/gantthourex1.php @@ -1,7 +1,7 @@ SetMarginColor('blue:1.7'); $graph->SetColor('white'); -$graph->SetBackgroundGradient('navy', 'white', GRAD_HOR, BGRAD_MARGIN); +$graph->SetBackgroundGradient('navy', 'white', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_MARGIN')); $graph->scale->hour->SetBackgroundColor('lightyellow:1.5'); -$graph->scale->hour->SetFont(FF_FONT1); +$graph->scale->hour->SetFont(Graph\Configs::getConfig('FF_FONT1')); $graph->scale->day->SetBackgroundColor('lightyellow:1.5'); -$graph->scale->day->SetFont(FF_FONT1, FS_BOLD); - -$graph->title->Set('Example of hours in scale'); +$graph->scale->day->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$example_title = 'Example of hours in scale'; +$graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); -$graph->ShowHeaders(GANTT_HDAY | GANTT_HHOUR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HHOUR')); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); -$graph->scale->week->SetFont(FF_FONT1); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT1')); $graph->scale->hour->SetIntervall(4); -$graph->scale->hour->SetStyle(HOURSTYLE_HM24); -$graph->scale->day->SetStyle(DAYSTYLE_SHORTDAYDATE3); +$graph->scale->hour->SetStyle(Graph\Configs::getConfig('HOURSTYLE_HM24')); +$graph->scale->day->SetStyle(Graph\Configs::getConfig('DAYSTYLE_SHORTDAYDATE3')); $data = [ [0, ' Label 1', '2001-01-26 04:00', '2001-01-26 14:00'], @@ -42,7 +42,7 @@ if (count($data[$i]) > 4) { $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); } - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('red'); $graph->Add($bar); } diff --git a/Examples/examples_gantt/gantthourminex1.php b/Examples/examples_gantt/gantthourminex1.php old mode 100755 new mode 100644 index 499429d8..013b24c7 --- a/Examples/examples_gantt/gantthourminex1.php +++ b/Examples/examples_gantt/gantthourminex1.php @@ -1,7 +1,7 @@ SetColor('white'); // We want to display day, hour and minute scales -$graph->ShowHeaders(GANTT_HDAY | GANTT_HHOUR | GANTT_HMIN); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HHOUR') | Graph\Configs::getConfig('GANTT_HMIN')); // We want to have the following titles in our columns // describing each activity @@ -32,9 +32,9 @@ // Uncomment the following line if you don't want the 3D look // in the columns headers -//$graph->scale->actinfo->SetStyle(ACTINFO_2D); +//$graph->scale->actinfo->SetStyle(Graph\Configs::getConfig('ACTINFO_2D')); -$graph->scale->actinfo->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->scale->actinfo->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); //These are the default values for use in the columns //$graph->scale->actinfo->SetFontColor('black'); @@ -46,38 +46,38 @@ // Setup day format $graph->scale->day->SetBackgroundColor('lightyellow:1.5'); -$graph->scale->day->SetFont(FF_ARIAL); -$graph->scale->day->SetStyle(DAYSTYLE_SHORTDAYDATE1); +$graph->scale->day->SetFont(Graph\Configs::getConfig('FF_ARIAL')); +$graph->scale->day->SetStyle(Graph\Configs::getConfig('DAYSTYLE_SHORTDAYDATE1')); // Setup hour format $graph->scale->hour->SetIntervall(1); $graph->scale->hour->SetBackgroundColor('lightyellow:1.5'); -$graph->scale->hour->SetFont(FF_FONT0); -$graph->scale->hour->SetStyle(HOURSTYLE_H24); +$graph->scale->hour->SetFont(Graph\Configs::getConfig('FF_FONT0')); +$graph->scale->hour->SetStyle(Graph\Configs::getConfig('HOURSTYLE_H24')); $graph->scale->hour->grid->SetColor('gray:0.8'); // Setup minute format $graph->scale->minute->SetIntervall(30); $graph->scale->minute->SetBackgroundColor('lightyellow:1.5'); -$graph->scale->minute->SetFont(FF_FONT0); -$graph->scale->minute->SetStyle(MINUTESTYLE_MM); +$graph->scale->minute->SetFont(Graph\Configs::getConfig('FF_FONT0')); +$graph->scale->minute->SetStyle(Graph\Configs::getConfig('MINUTESTYLE_MM')); $graph->scale->minute->grid->SetColor('lightgray'); $graph->scale->tableTitle->Set('Phase 1'); -$graph->scale->tableTitle->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->scale->tableTitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $graph->scale->SetTableTitleBackground('darkgreen@0.6'); $graph->scale->tableTitle->Show(true); - -$graph->title->Set('Example of hours & mins scale'); +$example_title = 'Example of hours & mins scale'; +$graph->title->set($example_title); $graph->title->SetColor('darkgray'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); for ($i = 0; $i < count($data); ++$i) { $bar = new Plot\GanttBar($data[$i][0], $data[$i][1], $data[$i][2], $data[$i][3]); if (count($data[$i]) > 4) { $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); } - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('gray'); $graph->Add($bar); } @@ -86,8 +86,9 @@ $vline = new Plot\GanttVLine('2001-11-27 9:00'); //d=1006858800, $vline->SetWeight(5); $vline->SetDayOffset(0); -$vline->title->Set('27/11 9:00'); -$vline->title->SetFont(FF_FONT1, FS_BOLD, 10); +$example_title = '27/11 9:00'; +$vline->title->set($example_title); +$vline->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->Add($vline); $graph->Stroke(); diff --git a/Examples/examples_gantt/gantticonex1.php b/Examples/examples_gantt/gantticonex1.php old mode 100755 new mode 100644 index 1a9627e0..baa1d30f --- a/Examples/examples_gantt/gantticonex1.php +++ b/Examples/examples_gantt/gantticonex1.php @@ -1,7 +1,7 @@ title->Set('Gantt chart with title columns and icons'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph = new Graph\GanttGraph(); +$example_title = 'Gantt chart with title columns and icons'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetMargin(10); // Explicitely set the date range @@ -30,7 +31,7 @@ $graph->scale->dividerh->SetColor('yellow:0.6'); // Display month and year scale with the gridlines -$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HYEAR')); $graph->scale->month->grid->SetColor('gray'); $graph->scale->month->grid->Show(true); $graph->scale->year->grid->SetColor('gray'); @@ -42,7 +43,7 @@ [30, 100] ); $graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); -$graph->scale->actinfo->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->scale->actinfo->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $graph->scale->actinfo->vgrid->SetStyle('solid'); $graph->scale->actinfo->vgrid->SetColor('gray'); @@ -50,17 +51,17 @@ //$graph->scale->actinfo->Show(false); // Setup the icons we want to use -$erricon = new Image\IconImage(GICON_FOLDER, 0.6); -$startconicon = new Image\IconImage(GICON_FOLDEROPEN, 0.6); -$endconicon = new Image\IconImage(GICON_TEXTIMPORTANT, 0.5); +$erricon = new Image\IconImage(Graph\Configs::getConfig('GICON_FOLDER'), 0.6); +$startconicon = new Image\IconImage(Graph\Configs::getConfig('GICON_FOLDEROPEN'), 0.6); +$endconicon = new Image\IconImage(Graph\Configs::getConfig('GICON_TEXTIMPORTANT'), 0.5); // Store the icons in the first column and use plain text in the others $data = [ - [0, [$erricon, 'Pre-study', '102 days', "23 Nov '01", "1 Mar '02"], '2001-11-23', '2002-03-1', FF_ARIAL, FS_NORMAL, 8], + [0, [$erricon, 'Pre-study', '102 days', "23 Nov '01", "1 Mar '02"], '2001-11-23', '2002-03-1', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8], [1, [$startconicon, 'Prototype', '21 days', "26 Oct '01", "16 Nov '01"], - '2001-10-26', '2001-11-16', FF_ARIAL, FS_NORMAL, 8, ], + '2001-10-26', '2001-11-16', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8, ], [2, [$endconicon, 'Report', '12 days', "1 Mar '02", "13 Mar '02"], - '2002-03-01', '2002-03-13', FF_ARIAL, FS_NORMAL, 8, ], + '2002-03-01', '2002-03-13', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8, ], ]; // Create the bars and add them to the gantt chart @@ -69,10 +70,10 @@ if (count($data[$i]) > 4) { $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); } - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('gray'); $bar->progress->Set(0.5); - $bar->progress->SetPattern(GANTT_SOLID, 'darkgreen'); + $bar->progress->SetPattern(Graph\Configs::getConfig('GANTT_SOLID'), 'darkgreen'); $bar->title->SetCSIMTarget(['#1' . $i, '#2' . $i, '#3' . $i, '#4' . $i, '#5' . $i], ['11' . $i, '22' . $i, '33' . $i]); $graph->Add($bar); } diff --git a/Examples/examples_gantt/ganttmonthyearex1.php b/Examples/examples_gantt/ganttmonthyearex1.php old mode 100755 new mode 100644 index ed32c1be..5732aad8 --- a/Examples/examples_gantt/ganttmonthyearex1.php +++ b/Examples/examples_gantt/ganttmonthyearex1.php @@ -1,16 +1,16 @@ title->Set('Only month & year scale'); +$graph = new Graph\GanttGraph(); +$example_title = 'Only month & year scale'; +$graph->title->set($example_title); // Setup some "very" nonstandard colors $graph->SetMarginColor('lightgreen@0.8'); @@ -24,7 +24,7 @@ $graph->SetDateRange('2001-10-06', '2002-4-01'); // Display month and year scale with the gridlines -$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HYEAR')); $graph->scale->month->grid->SetColor('gray'); $graph->scale->month->grid->Show(true); $graph->scale->year->grid->SetColor('gray'); @@ -32,7 +32,7 @@ // Data for our example activities $data = [ - [0, 'Group 1 Johan', '2001-11-23', '2002-03-1', FF_FONT1, FS_BOLD, 8], + [0, 'Group 1 Johan', '2001-11-23', '2002-03-1', Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 8], [1, ' Label 2', '2001-10-26', '2001-11-16'], ]; // Create the bars and add them to the gantt chart @@ -41,10 +41,10 @@ if (count($data[$i]) > 4) { $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); } - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('red'); $bar->progress->Set(0.5); - $bar->progress->SetPattern(GANTT_SOLID, 'darkgreen'); + $bar->progress->SetPattern(Graph\Configs::getConfig('GANTT_SOLID'), 'darkgreen'); $graph->Add($bar); } diff --git a/Examples/examples_gantt/ganttmonthyearex2.php b/Examples/examples_gantt/ganttmonthyearex2.php old mode 100755 new mode 100644 index 9d8bdedf..b787ed2a --- a/Examples/examples_gantt/ganttmonthyearex2.php +++ b/Examples/examples_gantt/ganttmonthyearex2.php @@ -1,16 +1,16 @@ title->Set('Only month & year scale'); +$graph = new Graph\GanttGraph(); +$example_title = 'Only month & year scale'; +$graph->title->set($example_title); // Setup some "very" nonstandard colors $graph->SetMarginColor('lightgreen@0.8'); @@ -24,7 +24,7 @@ $graph->SetDateRange('2001-10-06', '2002-4-10'); // Display month and year scale with the gridlines -$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HYEAR')); $graph->scale->month->grid->SetColor('gray'); $graph->scale->month->grid->Show(true); $graph->scale->year->grid->SetColor('gray'); @@ -38,17 +38,17 @@ [100] ); $graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); -$graph->scale->actinfo->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->scale->actinfo->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $graph->scale->actinfo->vgrid->SetStyle('solid'); $graph->scale->actinfo->vgrid->SetColor('gray'); // Data for our example activities $data = [ - [0, ['Pre-study', '102 days', "23 Nov '01", "1 Mar '02"], '2001-11-23', '2002-03-1', FF_ARIAL, FS_NORMAL, 8], + [0, ['Pre-study', '102 days', "23 Nov '01", "1 Mar '02"], '2001-11-23', '2002-03-1', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8], [1, ['Prototype', '21 days', "26 Oct '01", "16 Nov '01"], - '2001-10-26', '2001-11-16', FF_ARIAL, FS_NORMAL, 8, ], + '2001-10-26', '2001-11-16', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8, ], [2, ['Report', '12 days', "1 Mar '02", "13 Mar '02"], - '2002-03-01', '2002-03-13', FF_ARIAL, FS_NORMAL, 8, ], + '2002-03-01', '2002-03-13', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8, ], ]; // Create the bars and add them to the gantt chart @@ -57,10 +57,10 @@ if (count($data[$i]) > 4) { $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); } - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('gray'); $bar->progress->Set(0.5); - $bar->progress->SetPattern(GANTT_SOLID, 'darkgreen'); + $bar->progress->SetPattern(Graph\Configs::getConfig('GANTT_SOLID'), 'darkgreen'); $graph->Add($bar); } diff --git a/Examples/examples_gantt/ganttmonthyearex3.php b/Examples/examples_gantt/ganttmonthyearex3.php old mode 100755 new mode 100644 index 721163c6..7b695237 --- a/Examples/examples_gantt/ganttmonthyearex3.php +++ b/Examples/examples_gantt/ganttmonthyearex3.php @@ -1,16 +1,16 @@ title->Set('Only month & year scale'); +$graph = new Graph\GanttGraph(); +$example_title = 'Only month & year scale'; +$graph->title->set($example_title); // Setup some "very" nonstandard colors $graph->SetMarginColor('lightgreen@0.8'); @@ -24,7 +24,7 @@ $graph->SetDateRange('2001-10-06', '2002-4-10'); // Display month and year scale with the gridlines -$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HYEAR')); $graph->scale->month->grid->SetColor('gray'); $graph->scale->month->grid->Show(true); $graph->scale->year->grid->SetColor('gray'); @@ -38,17 +38,17 @@ [40, 100] ); $graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); -$graph->scale->actinfo->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->scale->actinfo->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $graph->scale->actinfo->vgrid->SetStyle('solid'); $graph->scale->actinfo->vgrid->SetColor('gray'); // Data for our example activities $data = [ - [0, ['', 'Pre-study', '102 days', "23 Nov '01", "1 Mar '02"], '2001-11-23', '2002-03-1', FF_ARIAL, FS_NORMAL, 8], + [0, ['', 'Pre-study', '102 days', "23 Nov '01", "1 Mar '02"], '2001-11-23', '2002-03-1', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8], [1, ['', 'Prototype', '21 days', "26 Oct '01", "16 Nov '01"], - '2001-10-26', '2001-11-16', FF_ARIAL, FS_NORMAL, 8, ], + '2001-10-26', '2001-11-16', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8, ], [2, ['', 'Report', '12 days', "1 Mar '02", "13 Mar '02"], - '2002-03-01', '2002-03-13', FF_ARIAL, FS_NORMAL, 8, ], + '2002-03-01', '2002-03-13', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8, ], ]; // Create the bars and add them to the gantt chart @@ -57,10 +57,10 @@ if (count($data[$i]) > 4) { $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); } - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('gray'); $bar->progress->Set(0.5); - $bar->progress->SetPattern(GANTT_SOLID, 'darkgreen'); + $bar->progress->SetPattern(Graph\Configs::getConfig('GANTT_SOLID'), 'darkgreen'); $graph->Add($bar); } diff --git a/Examples/examples_gantt/ganttmonthyearex4.php b/Examples/examples_gantt/ganttmonthyearex4.php old mode 100755 new mode 100644 index be4c4170..92b361be --- a/Examples/examples_gantt/ganttmonthyearex4.php +++ b/Examples/examples_gantt/ganttmonthyearex4.php @@ -1,16 +1,16 @@ title->Set('Adding a spaning title'); +$graph = new Graph\GanttGraph(); +$example_title = 'Adding a spaning title'; +$graph->title->set($example_title); // Setup some "very" nonstandard colors $graph->SetMarginColor('lightgreen@0.8'); @@ -24,7 +24,7 @@ $graph->SetDateRange('2001-11-06', '2002-1-10'); // Display month and year scale with the gridlines -$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR | GANTT_HWEEK); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HWEEK')); $graph->scale->month->grid->SetColor('gray'); $graph->scale->month->grid->Show(true); $graph->scale->year->grid->SetColor('gray'); @@ -32,7 +32,7 @@ //Setup spanning title $graph->scale->tableTitle->Set('Phase 1'); -$graph->scale->tableTitle->SetFont(FF_ARIAL, FS_NORMAL, 16); +$graph->scale->tableTitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 16); $graph->scale->SetTableTitleBackground('darkgreen@0.6'); $graph->scale->tableTitle->Show(true); @@ -41,17 +41,17 @@ // For the titles we also add a minimum width of 100 pixels for the Task name column $graph->scale->actinfo->SetColTitles(['Name', 'Duration', 'Start', 'Finish'], [100]); $graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); -$graph->scale->actinfo->SetFont(FF_ARIAL, FS_NORMAL, 10); +$graph->scale->actinfo->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $graph->scale->actinfo->vgrid->SetStyle('solid'); $graph->scale->actinfo->vgrid->SetColor('gray'); // Data for our example activities $data = [ - [0, ['Pre-study', '102 days', "23 Nov '01", "1 Mar '02"], '2001-11-23', '2002-03-1', FF_ARIAL, FS_NORMAL, 8], + [0, ['Pre-study', '102 days', "23 Nov '01", "1 Mar '02"], '2001-11-23', '2002-03-1', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8], [1, ['Prototype', '21 days', "26 Oct '01", "16 Nov '01"], - '2001-10-26', '2001-11-16', FF_ARIAL, FS_NORMAL, 8, ], + '2001-10-26', '2001-11-16', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8, ], [2, ['Report', '12 days', "1 Mar '02", "13 Mar '02"], - '2002-03-01', '2002-03-13', FF_ARIAL, FS_NORMAL, 8, ], + '2002-03-01', '2002-03-13', Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8, ], ]; // Create the bars and add them to the gantt chart @@ -60,10 +60,10 @@ if (count($data[$i]) > 4) { $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]); } - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('gray'); $bar->progress->Set(0.5); - $bar->progress->SetPattern(GANTT_SOLID, 'darkgreen'); + $bar->progress->SetPattern(Graph\Configs::getConfig('GANTT_SOLID'), 'darkgreen'); $graph->Add($bar); } diff --git a/Examples/examples_gantt/ganttsimpleex1.php b/Examples/examples_gantt/ganttsimpleex1.php old mode 100755 new mode 100644 index 1ab09044..15839d73 --- a/Examples/examples_gantt/ganttsimpleex1.php +++ b/Examples/examples_gantt/ganttsimpleex1.php @@ -1,7 +1,7 @@ title->Set('Gantt Graph using CreateSimple()'); // Setup scale -$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); // Add the specified activities $graph->CreateSimple($data); diff --git a/Examples/examples_gantt/multconstganttex01.php b/Examples/examples_gantt/multconstganttex01.php old mode 100755 new mode 100644 index 646153c7..2535cdcb --- a/Examples/examples_gantt/multconstganttex01.php +++ b/Examples/examples_gantt/multconstganttex01.php @@ -1,7 +1,7 @@ title->Set('Example with multiple constrains'); +$graph = new Graph\GanttGraph(); +$example_title = 'Example with multiple constrains'; +$graph->title->set($example_title); $bar1 = new Plot\GanttBar(0, 'Label 1', '2003-06-08', '2003-06-12'); $bar2 = new Plot\GanttBar(1, 'Label 2', '2003-06-16', '2003-06-19'); $bar3 = new Plot\GanttBar(2, 'Label 3', '2003-06-15', '2003-06-21'); //create constraints -$bar1->SetConstrain(1, CONSTRAIN_ENDSTART); -$bar1->SetConstrain(2, CONSTRAIN_ENDSTART); +$bar1->SetConstrain(1, Graph\Configs::getConfig('CONSTRAIN_ENDSTART')); +$bar1->SetConstrain(2, Graph\Configs::getConfig('CONSTRAIN_ENDSTART')); // Setup scale -$graph->ShowHeaders( /*GANTT_HYEAR | GANTT_HMONTH |*/GANTT_HDAY | GANTT_HWEEK); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAYWNBR')); // Add the specified activities $graph->Add($bar1); diff --git a/Examples/examples_gantt/ganttex_slice.php b/Examples/examples_gantt/no_dim_ganttex_slice.php old mode 100755 new mode 100644 similarity index 50% rename from Examples/examples_gantt/ganttex_slice.php rename to Examples/examples_gantt/no_dim_ganttex_slice.php index 288e6ec2..f62a91ec --- a/Examples/examples_gantt/ganttex_slice.php +++ b/Examples/examples_gantt/no_dim_ganttex_slice.php @@ -1,7 +1,7 @@ scale->SetWeekStart(0); +$example_title = 'General conversion plan'; +$graph->title->set($example_title); +$subtitle_text = '(Slice between 2001-11-22 to 2002-01-24)'; +$graph->subtitle->Set($subtitle_text); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 20); -$graph->title->Set('General conversion plan'); -$graph->subtitle->Set('(Slice between 2001-11-22 to 2002-01-24)'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 20); - -$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); -$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); -$graph->scale->week->SetFont(FF_FONT1); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HYEAR') | Graph\Configs::getConfig('GANTT_HMONTH') | Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK')); +$graph->scale->week->SetStyle(Graph\Configs::getConfig('WEEKSTYLE_FIRSTDAY')); +$graph->scale->week->SetFont(Graph\Configs::getConfig('FF_FONT1')); $data = [ - [0, "Group 1\tJohan", '2002-1-23', '2002-01-28', FF_FONT1, FS_BOLD, 8], + [0, "Group 1\tJohan", '2002-1-23', '2002-01-28', Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 8], [1, ' Label 2', '2001-10-26', '2001-11-16'], [2, ' Label 3', '2001-11-30', '2001-12-01'], - [4, 'Group 2', '2001-11-30', '2001-12-22', FF_FONT1, FS_BOLD, 8], + [4, 'Group 2', '2001-11-30', '2001-12-22', Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 8], [5, ' Label 4', '2001-11-30', '2001-12-1'], [6, ' Label 5', '2001-12-6', '2001-12-8'], [8, ' Label 8', '2001-11-30', '2002-01-02'], @@ -48,31 +49,32 @@ } $bar->rightMark->Show(); - $bar->rightMark->SetType(MARK_FILLEDCIRCLE); + $bar->rightMark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $bar->rightMark->SetWidth(8); $bar->rightMark->SetColor('red'); $bar->rightMark->SetFillColor('red'); $bar->rightMark->title->Set($i + 1); - $bar->rightMark->title->SetFont(FF_ARIAL, FS_BOLD, 12); + $bar->rightMark->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $bar->rightMark->title->SetColor('white'); - $bar->SetPattern(BAND_RDIAG, 'yellow'); + $bar->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $bar->SetFillColor('red'); $bar->progress->Set($i / 10); - $bar->progress->SetPattern(GANTT_SOLID, 'darkgreen'); + $bar->progress->SetPattern(Graph\Configs::getConfig('GANTT_SOLID'), 'darkgreen'); $graph->Add($bar); } // The line will NOT be shown since it is outside the specified slice -$vline = new Plot\GanttVLine('2002-02-28'); -$vline->title->Set('2002-02-28'); -$vline->title->SetFont(FF_FONT1, FS_BOLD, 10); +$vline = new Plot\GanttVLine('2002-02-28'); +$example_title = '2002-02-28'; +$vline->title->set($example_title); +$vline->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->Add($vline); // The milestone will NOT be shown since it is outside the specified slice $ms = new Plot\MileStone(7, 'M5', '2002-01-28', '28/1'); -$ms->title->SetFont(FF_FONT1, FS_BOLD); +$ms->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->Add($ms); $graph->Stroke(); diff --git a/Examples/examples_gantt/no_test_ganttex19.php b/Examples/examples_gantt/no_test_ganttex19.php old mode 100755 new mode 100644 index a0022049..a47a8537 --- a/Examples/examples_gantt/no_test_ganttex19.php +++ b/Examples/examples_gantt/no_test_ganttex19.php @@ -1,7 +1,7 @@ scale->SetDateLocale('sv_SE'); // Add title and subtitle -$graph->title->Set('Example of captions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->subtitle->Set('(ganttex19.php)'); +$example_title = 'Example of captions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$subtitle_text = '(ganttex19.php)'; +$graph->subtitle->Set($subtitle_text); // Show day, week and month scale -$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(Graph\Configs::getConfig('GANTT_HDAY') | Graph\Configs::getConfig('GANTT_HWEEK') | Graph\Configs::getConfig('GANTT_HMONTH')); // Set table title $graph->scale->tableTitle->Set('(Rev: 1.22)'); -$graph->scale->tableTitle->SetFont(FF_FONT1, FS_BOLD); +$graph->scale->tableTitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->scale->SetTableTitleBackground('silver'); $graph->scale->tableTitle->Show(); @@ -37,7 +39,7 @@ // Use the short name of the month together with a 2 digit year // on the month scale -$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetStyle(Graph\Configs::getConfig('MONTHSTYLE_SHORTNAMEYEAR2')); $graph->scale->month->SetFontColor('white'); $graph->scale->month->SetBackgroundColor('blue'); @@ -49,7 +51,7 @@ $activity = new Plot\GanttBar(0, 'Project', '2001-12-21', '2002-01-07', '[50%]'); // Yellow diagonal line pattern on a red background -$activity->SetPattern(BAND_RDIAG, 'yellow'); +$activity->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity->SetFillColor('red'); // Set absolute height @@ -57,14 +59,14 @@ // Specify progress to 60% $activity->progress->Set(0.6); -$activity->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Format the bar for the second activity // ($row,$title,$startdate,$enddate) $activity2 = new Plot\GanttBar(1, 'Project', '2001-12-21', '2002-01-02', '[30%]'); // Yellow diagonal line pattern on a red background -$activity2->SetPattern(BAND_RDIAG, 'yellow'); +$activity2->SetPattern(Graph\Configs::getConfig('BAND_RDIAG'), 'yellow'); $activity2->SetFillColor('red'); // Set absolute height @@ -72,7 +74,7 @@ // Specify progress to 30% $activity2->progress->Set(0.3); -$activity2->progress->SetPattern(BAND_HVCROSS, 'blue'); +$activity2->progress->SetPattern(Graph\Configs::getConfig('BAND_HVCROSS'), 'blue'); // Finally add the bar to the graph $graph->Add($activity); diff --git a/Examples/examples_general/example0-0.php b/Examples/examples_general/example0-0.php old mode 100755 new mode 100644 index 441edb5a..c01f1873 --- a/Examples/examples_general/example0-0.php +++ b/Examples/examples_general/example0-0.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->img->SetMargin(30, 90, 40, 50); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); -$graph->title->Set('Example 1.1 same y-values'); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$example_title = 'Example 1.1 same y-values'; +$graph->title->set($example_title); // Create the linear plot $lineplot = new Plot\LinePlot($ydata); diff --git a/Examples/examples_general/example1.2.php b/Examples/examples_general/example1.2.php old mode 100755 new mode 100644 index 0252f283..950a455e --- a/Examples/examples_general/example1.2.php +++ b/Examples/examples_general/example1.2.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->img->SetMargin(30, 90, 40, 50); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); -$graph->title->Set('Dashed lineplot'); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$example_title = 'Dashed lineplot'; +$graph->title->set($example_title); // Create the linear plot $lineplot = new Plot\LinePlot($ydata); diff --git a/Examples/examples_general/example1.php b/Examples/examples_general/example1.php old mode 100755 new mode 100644 index 9faa0992..00ac2903 --- a/Examples/examples_general/example1.php +++ b/Examples/examples_general/example1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->img->SetMargin(50, 90, 40, 50); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); -$graph->title->Set('Examples for graph'); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$example_title = 'Examples for graph'; +$graph->title->set($example_title); // Create the linear plot $lineplot = new Plot\LinePlot($ydata); diff --git a/Examples/examples_general/example10.php b/Examples/examples_general/example10.php old mode 100755 new mode 100644 index e899fec7..9648a340 --- a/Examples/examples_general/example10.php +++ b/Examples/examples_general/example10.php @@ -1,7 +1,7 @@ SetColor('orange'); $lineplot2->SetWeight(2); $graph->y2axis->SetColor('orange'); - -$graph->title->Set('Example 10'); +$example_title = 'Example 10'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example11.php b/Examples/examples_general/example11.php old mode 100755 new mode 100644 index a77c05f7..c7d3c77e --- a/Examples/examples_general/example11.php +++ b/Examples/examples_general/example11.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetMargin(40, 20, 20, 60); - -$graph->title->Set('Timing a graph'); +$example_title = 'Timing a graph'; +$graph->title->set($example_title); $graph->footer->right->Set('Timer (ms): '); -$graph->footer->right->SetFont(FF_COURIER, FS_ITALIC); +$graph->footer->right->SetFont(Graph\Configs::getConfig('FF_COURIER'), Graph\Configs::getConfig('FS_ITALIC')); $graph->footer->SetTimer($timer); // Create the linear plot @@ -40,9 +40,9 @@ $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example13.php b/Examples/examples_general/example13.php old mode 100755 new mode 100644 index bbd71eaa..8c455492 --- a/Examples/examples_general/example13.php +++ b/Examples/examples_general/example13.php @@ -1,7 +1,7 @@ Add($errplot); - -$graph->title->Set('Simple error plot'); +$example_title = 'Simple error plot'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $datax = $graph->gDateLocale->GetShortMonth(); $graph->xaxis->SetTickLabels($datax); diff --git a/Examples/examples_general/example14.php b/Examples/examples_general/example14.php old mode 100755 new mode 100644 index 64ffd621..ebf2fd4f --- a/Examples/examples_general/example14.php +++ b/Examples/examples_general/example14.php @@ -1,7 +1,7 @@ Add($errplot); - -$graph->title->Set('Simple error plot'); +$example_title = 'Simple error plot'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $datax = $graph->gDateLocale->GetShortMonth(); $graph->xaxis->SetTickLabels($datax); diff --git a/Examples/examples_general/example15.php b/Examples/examples_general/example15.php old mode 100755 new mode 100644 index e14b7883..ad4a144c --- a/Examples/examples_general/example15.php +++ b/Examples/examples_general/example15.php @@ -1,7 +1,7 @@ Add($errplot); - -$graph->title->Set('Linear error plot'); +$example_title = 'Linear error plot'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $datax = $graph->gDateLocale->GetShortMonth(); $graph->xaxis->SetTickLabels($datax); diff --git a/Examples/examples_general/example16.1.php b/Examples/examples_general/example16.1.php old mode 100755 new mode 100644 index 705a9a06..cb13a8fb --- a/Examples/examples_general/example16.1.php +++ b/Examples/examples_general/example16.1.php @@ -1,7 +1,7 @@ Add($l2plot); $graph->Add($l1plot); - -$graph->title->Set('Mixing line and filled line'); +$example_title = 'Mixing line and filled line'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); //$graph->xaxis->SetTickLabels($datax); //$graph->xaxis->SetTextTickInterval(2); diff --git a/Examples/examples_general/example16.6.php b/Examples/examples_general/example16.6.php old mode 100755 new mode 100644 index 3484fa72..075619b9 --- a/Examples/examples_general/example16.6.php +++ b/Examples/examples_general/example16.6.php @@ -1,7 +1,7 @@ GetStat(); list($xd, $yd) = $lr->GetY(0, 19); // Setup title -$graph->title->Set('Linear regression'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$example_title = 'Linear regression'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->subtitle->Set('(stderr=' . sprintf('%.2f', $stderr) . ', corr=' . sprintf('%.2f', $corr) . ')'); -$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // make sure that the X-axis is always at the // bottom at the plot and not just at Y=0 which is @@ -43,7 +44,7 @@ // Create the scatter plot with some nice colors $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $sp1->mark->SetFillColor('red'); $sp1->SetColor('blue'); $sp1->SetWeight(3); diff --git a/Examples/examples_general/example16.php b/Examples/examples_general/example16.php old mode 100755 new mode 100644 index 05257ee9..8d9d53af --- a/Examples/examples_general/example16.php +++ b/Examples/examples_general/example16.php @@ -1,7 +1,7 @@ Add($errplot); - -$graph->title->Set('Linear error plot'); +$example_title = 'Linear error plot'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $datax = $graph->gDateLocale->GetShortMonth(); $graph->xaxis->SetTickLabels($datax); diff --git a/Examples/examples_general/example17.php b/Examples/examples_general/example17.php old mode 100755 new mode 100644 index deb9a00b..8cd7d65f --- a/Examples/examples_general/example17.php +++ b/Examples/examples_general/example17.php @@ -1,7 +1,7 @@ Add($accplot); $graph->xaxis->SetTextTickInterval(2); -$graph->title->Set('Example 17'); +$example_title = 'Example 17'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Display the graph $graph->Stroke(); diff --git a/Examples/examples_general/example2.1.php b/Examples/examples_general/example2.1.php old mode 100755 new mode 100644 index fcaa88d7..bed77c78 --- a/Examples/examples_general/example2.1.php +++ b/Examples/examples_general/example2.1.php @@ -1,7 +1,7 @@ value->Show(); $lineplot->value->SetColor('red'); -$lineplot->value->SetFont(FF_FONT1, FS_BOLD); +$lineplot->value->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Add the plot to the graph $graph->Add($lineplot); $graph->img->SetMargin(40, 20, 20, 40); -$graph->title->Set('Example 2.1'); +$example_title = 'Example 2.1'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_general/example2.5.php b/Examples/examples_general/example2.5.php old mode 100755 new mode 100644 index e208a1bf..55b851cb --- a/Examples/examples_general/example2.5.php +++ b/Examples/examples_general/example2.5.php @@ -1,7 +1,7 @@ Add($lineplot); $graph->img->SetMargin(40, 20, 20, 40); -$graph->title->Set('Example 2.5'); +$example_title = 'Example 2.5'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->xaxis->SetPos('min'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_general/example2.6.php b/Examples/examples_general/example2.6.php old mode 100755 new mode 100644 index 879d3ad2..984de79a --- a/Examples/examples_general/example2.6.php +++ b/Examples/examples_general/example2.6.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Calls per operator'); -$graph->subtitle->Set('(March 12, 2008)'); +$example_title = 'Calls per operator'; +$graph->title->set($example_title); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); diff --git a/Examples/examples_general/example26.1.php b/Examples/examples_general/example26.1.php old mode 100755 new mode 100644 index 9227accc..59993dfa --- a/Examples/examples_general/example26.1.php +++ b/Examples/examples_general/example26.1.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('A simple Pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'A simple Pie plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot($data); $p1->SetLegends($graph->gDateLocale->GetShortMonth()); diff --git a/Examples/examples_general/example26.php b/Examples/examples_general/example26.php old mode 100755 new mode 100644 index 470c4ffe..58775e67 --- a/Examples/examples_general/example26.php +++ b/Examples/examples_general/example26.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('A simple Pie plot'); +$example_title = 'A simple Pie plot'; +$graph->title->set($example_title); $p1 = new Plot\PiePlot($data); $graph->Add($p1); diff --git a/Examples/examples_general/example27.1.php b/Examples/examples_general/example27.1.php old mode 100755 new mode 100644 index f082e0bd..f88f07cb --- a/Examples/examples_general/example27.1.php +++ b/Examples/examples_general/example27.1.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('A simple Pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'A simple Pie plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot3D($data); $p1->SetAngle(20); diff --git a/Examples/examples_general/example27.2.php b/Examples/examples_general/example27.2.php old mode 100755 new mode 100644 index 404b6df7..080afdac --- a/Examples/examples_general/example27.2.php +++ b/Examples/examples_general/example27.2.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('A simple Pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'A simple Pie plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot($data); $p1->ExplodeSlice(1); diff --git a/Examples/examples_general/example27.3.php b/Examples/examples_general/example27.3.php old mode 100755 new mode 100644 index b4b7e7b1..84cb6024 --- a/Examples/examples_general/example27.3.php +++ b/Examples/examples_general/example27.3.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('A simple 3D Pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'A simple 3D Pie plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot3D($data); $p1->ExplodeSlice(1); diff --git a/Examples/examples_general/example27.php b/Examples/examples_general/example27.php old mode 100755 new mode 100644 index 5e7f0b94..a3cefbff --- a/Examples/examples_general/example27.php +++ b/Examples/examples_general/example27.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('A simple Pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'A simple Pie plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot3D($data); $p1->SetSize(0.5); diff --git a/Examples/examples_general/example28.1.php b/Examples/examples_general/example28.1.php old mode 100755 new mode 100644 index de940634..e9ab1b5d --- a/Examples/examples_general/example28.1.php +++ b/Examples/examples_general/example28.1.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set("'earth' Theme"); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = "'earth' Theme"; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot($data); $p1->SetTheme('earth'); diff --git a/Examples/examples_general/example28.2.php b/Examples/examples_general/example28.2.php old mode 100755 new mode 100644 index 6be2523a..6f35e308 --- a/Examples/examples_general/example28.2.php +++ b/Examples/examples_general/example28.2.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set("'pastel' Theme"); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = "'pastel' Theme"; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot($data); $p1->SetTheme('pastel'); diff --git a/Examples/examples_general/example28.3.php b/Examples/examples_general/example28.3.php old mode 100755 new mode 100644 index bf96e526..39afa984 --- a/Examples/examples_general/example28.3.php +++ b/Examples/examples_general/example28.3.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set("'water' Theme"); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = "'water' Theme"; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot($data); $p1->SetTheme('water'); diff --git a/Examples/examples_general/example28.php b/Examples/examples_general/example28.php old mode 100755 new mode 100644 index 40ebd36e..e1d3409b --- a/Examples/examples_general/example28.php +++ b/Examples/examples_general/example28.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set("'sand' Theme"); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = "'sand' Theme"; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot($data); $p1->SetTheme('sand'); diff --git a/Examples/examples_general/example3.0.1.php b/Examples/examples_general/example3.0.1.php old mode 100755 new mode 100644 index 8d72e9a1..ae5ac0cc --- a/Examples/examples_general/example3.0.1.php +++ b/Examples/examples_general/example3.0.1.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Calls per operator'); -$graph->subtitle->Set('(March 12, 2008)'); +$example_title = 'Calls per operator'; +$graph->title->set($example_title); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('blue'); diff --git a/Examples/examples_general/example3.0.2.php b/Examples/examples_general/example3.0.2.php old mode 100755 new mode 100644 index 16356beb..afeac5e0 --- a/Examples/examples_general/example3.0.2.php +++ b/Examples/examples_general/example3.0.2.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Interpolated values'); +$example_title = 'Interpolated values'; +$graph->title->set($example_title); $graph->xaxis->title->Set('x-title'); $graph->yaxis->title->Set('y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 9); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 9); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 9); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 9); $graph->yaxis->SetColor('blue'); diff --git a/Examples/examples_general/example3.0.3.php b/Examples/examples_general/example3.0.3.php old mode 100755 new mode 100644 index 699e86d1..128d16d3 --- a/Examples/examples_general/example3.0.3.php +++ b/Examples/examples_general/example3.0.3.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('NULL values'); +$example_title = 'NULL values'; +$graph->title->set($example_title); $graph->xaxis->title->Set('x-title'); $graph->yaxis->title->Set('y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 9); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 9); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 9); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 9); $graph->yaxis->SetColor('blue'); diff --git a/Examples/examples_general/example3.1.1.php b/Examples/examples_general/example3.1.1.php old mode 100755 new mode 100644 index c79418af..efc6cd0f --- a/Examples/examples_general/example3.1.1.php +++ b/Examples/examples_general/example3.1.1.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Calls per operator'); -$graph->subtitle->Set('(March 12, 2008)'); +$example_title = 'Calls per operator'; +$graph->title->set($example_title); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('blue'); @@ -39,7 +41,7 @@ $lineplot->SetWeight(2); // Two pixel wide // Add an image mark scaled to 50% -$lineplot->mark->SetType(MARK_IMG_DIAMOND, 'red', 0.5); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_IMG_DIAMOND'), 'red', 0.5); // Add the plot to the graph $graph->Add($lineplot); diff --git a/Examples/examples_general/example3.1.php b/Examples/examples_general/example3.1.php old mode 100755 new mode 100644 index 5218436c..0678cedd --- a/Examples/examples_general/example3.1.php +++ b/Examples/examples_general/example3.1.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Calls per operator'); -$graph->subtitle->Set('(March 12, 2008)'); +$example_title = 'Calls per operator'; +$graph->title->set($example_title); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('blue'); @@ -37,7 +39,7 @@ $lineplot = new Plot\LinePlot($ydata); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); // Two pixel wide -$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_UTRIANGLE')); $lineplot->mark->SetColor('blue'); $lineplot->mark->SetFillColor('red'); diff --git a/Examples/examples_general/example3.2.1.php b/Examples/examples_general/example3.2.1.php old mode 100755 new mode 100644 index d50f73d5..cec3bf2f --- a/Examples/examples_general/example3.2.1.php +++ b/Examples/examples_general/example3.2.1.php @@ -1,7 +1,7 @@ mark->SetType(MARK_CIRCLE); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_CIRCLE')); // Add the plot to the graph $graph->Add($lineplot); $graph->img->SetMargin(40, 20, 20, 40); -$graph->title->Set('Grace value, version 1'); +$example_title = 'Grace value, version 1'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example3.2.2.php b/Examples/examples_general/example3.2.2.php old mode 100755 new mode 100644 index b55ad90d..8d76d361 --- a/Examples/examples_general/example3.2.2.php +++ b/Examples/examples_general/example3.2.2.php @@ -1,7 +1,7 @@ mark->SetType(MARK_CIRCLE); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_CIRCLE')); // Add the plot to the graph $graph->Add($lineplot); $graph->img->SetMargin(40, 20, 20, 40); -$graph->title->Set('Grace value version 2'); +$example_title = 'Grace value version 2'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); $graph->xaxis->SetPos('min'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example3.2.php b/Examples/examples_general/example3.2.php old mode 100755 new mode 100644 index d3d27e6a..00b6962e --- a/Examples/examples_general/example3.2.php +++ b/Examples/examples_general/example3.2.php @@ -1,7 +1,7 @@ mark->SetType(MARK_CIRCLE); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_CIRCLE')); // Add the plot to the graph $graph->Add($lineplot); $graph->img->SetMargin(40, 20, 20, 40); -$graph->title->Set('Example 3.2'); +$example_title = 'Example 3.2'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example3.3.php b/Examples/examples_general/example3.3.php old mode 100755 new mode 100644 index 6eed636a..92f85a94 --- a/Examples/examples_general/example3.3.php +++ b/Examples/examples_general/example3.3.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Calls per operator'); -$graph->subtitle->Set('(March 12, 2008)'); +$example_title = 'Calls per operator'; +$graph->title->set($example_title); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('blue'); @@ -37,7 +39,7 @@ $lineplot = new Plot\LinePlot($ydata); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); // Two pixel wide -$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_UTRIANGLE')); $lineplot->mark->SetColor('blue'); $lineplot->mark->SetFillColor('red'); diff --git a/Examples/examples_general/example3.4.1.php b/Examples/examples_general/example3.4.1.php old mode 100755 new mode 100644 index 756edf98..364e0a5a --- a/Examples/examples_general/example3.4.1.php +++ b/Examples/examples_general/example3.4.1.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Calls per operator'); -$graph->subtitle->Set('(March 12, 2008)'); +$example_title = 'Calls per operator'; +$graph->title->set($example_title); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('blue'); @@ -69,12 +71,12 @@ function formatCallback($aVal) $lineplot = new Plot\LinePlot($ydata); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); // Two pixel wide -$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_UTRIANGLE')); $lineplot->mark->SetColor('blue'); $lineplot->mark->SetFillColor('red'); $lineplot->value->Show(); -$lineplot->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$lineplot->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $lineplot->value->SetColor('darkred'); $lineplot->value->SetFormatCallback('formatCallback'); diff --git a/Examples/examples_general/example3.4.php b/Examples/examples_general/example3.4.php old mode 100755 new mode 100644 index 5d321b83..10dae742 --- a/Examples/examples_general/example3.4.php +++ b/Examples/examples_general/example3.4.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Calls per operator'); -$graph->subtitle->Set('(March 12, 2008)'); +$example_title = 'Calls per operator'; +$graph->title->set($example_title); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('blue'); @@ -37,12 +39,12 @@ $lineplot = new Plot\LinePlot($ydata); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); // Two pixel wide -$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_UTRIANGLE')); $lineplot->mark->SetColor('blue'); $lineplot->mark->SetFillColor('red'); $lineplot->value->Show(); -$lineplot->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$lineplot->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $lineplot->value->SetColor('darkred'); $lineplot->value->SetFormat('(%d)'); diff --git a/Examples/examples_general/example3.php b/Examples/examples_general/example3.php old mode 100755 new mode 100644 index 37ddefed..5c152c2c --- a/Examples/examples_general/example3.php +++ b/Examples/examples_general/example3.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); -$graph->title->Set('Calls per operator'); -$graph->subtitle->Set('(March 12, 2008)'); +$example_title = 'Calls per operator'; +$graph->title->set($example_title); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Create the linear plot $lineplot = new Plot\LinePlot($ydata); diff --git a/Examples/examples_general/example4.php b/Examples/examples_general/example4.php old mode 100755 new mode 100644 index 92951b8b..89c8ac1d --- a/Examples/examples_general/example4.php +++ b/Examples/examples_general/example4.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 20, 40); $graph->title->Set('Calls per operator (June,July)'); -$graph->subtitle->Set('(March 12, 2008)'); +$subtitle_text = '(March 12, 2008)'; +$graph->subtitle->Set($subtitle_text); $graph->xaxis->title->Set('Operator'); $graph->yaxis->title->Set('# of calls'); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Create the first data series $lineplot = new Plot\LinePlot($ydata); diff --git a/Examples/examples_general/example5.1.php b/Examples/examples_general/example5.1.php old mode 100755 new mode 100644 index 13367ad4..d00ab130 --- a/Examples/examples_general/example5.1.php +++ b/Examples/examples_general/example5.1.php @@ -1,7 +1,7 @@ SetColor('orange'); $lineplot2->SetWeight(2); $graph->y2axis->SetColor('orange'); - -$graph->title->Set('Example 5'); +$example_title = 'Example 5'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example5.php b/Examples/examples_general/example5.php old mode 100755 new mode 100644 index 587f4acd..7ff00f07 --- a/Examples/examples_general/example5.php +++ b/Examples/examples_general/example5.php @@ -1,7 +1,7 @@ SetColor('orange'); $lineplot2->SetWeight(2); $graph->y2axis->SetColor('orange'); - -$graph->title->Set('Example 5'); +$example_title = 'Example 5'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example6.1.php b/Examples/examples_general/example6.1.php old mode 100755 new mode 100644 index 13a580e1..ce8919a4 --- a/Examples/examples_general/example6.1.php +++ b/Examples/examples_general/example6.1.php @@ -1,7 +1,7 @@ y2axis->SetColor('orange'); $graph->yaxis->SetColor('blue'); - -$graph->title->Set('Example 6.1'); +$example_title = 'Example 6.1'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Set the colors for the plots $lineplot->SetColor('blue'); @@ -55,7 +55,7 @@ $lineplot2->SetLegend('Plot 2'); // Adjust the legend position -$graph->legend->SetLayout(LEGEND_HOR); +$graph->legend->SetLayout(Graph\Configs::getConfig('LEGEND_HOR')); $graph->legend->Pos(0.4, 0.95, 'center', 'bottom'); // Display the graph diff --git a/Examples/examples_general/example6.2.php b/Examples/examples_general/example6.2.php old mode 100755 new mode 100644 index e9199de4..076d206e --- a/Examples/examples_general/example6.2.php +++ b/Examples/examples_general/example6.2.php @@ -1,7 +1,7 @@ yaxis->SetColor('blue'); - -$graph->title->Set('Example 6.2'); +$example_title = 'Example 6.2'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Set the colors for the plots $lineplot->SetColor('blue'); @@ -47,7 +47,7 @@ $graph->Add($lineplot); // Adjust the legend position -$graph->legend->SetLayout(LEGEND_HOR); +$graph->legend->SetLayout(Graph\Configs::getConfig('LEGEND_HOR')); $graph->legend->Pos(0.4, 0.95, 'center', 'bottom'); // Display the graph diff --git a/Examples/examples_general/example6.php b/Examples/examples_general/example6.php old mode 100755 new mode 100644 index c555e287..f8fd58db --- a/Examples/examples_general/example6.php +++ b/Examples/examples_general/example6.php @@ -1,7 +1,7 @@ y2axis->SetColor('orange'); $graph->yaxis->SetColor('blue'); - -$graph->title->Set('Example 6'); +$example_title = 'Example 6'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Set the colors for the plots $lineplot->SetColor('blue'); diff --git a/Examples/examples_general/example7.php b/Examples/examples_general/example7.php old mode 100755 new mode 100644 index ec3944ce..05b076ce --- a/Examples/examples_general/example7.php +++ b/Examples/examples_general/example7.php @@ -1,7 +1,7 @@ Add($lineplot); $graph->AddY2($lineplot2); $graph->yaxis->SetColor('blue'); - -$graph->title->Set('Example 7'); +$example_title = 'Example 7'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example8.1.php b/Examples/examples_general/example8.1.php old mode 100755 new mode 100644 index 08bfb3bd..f0642905 --- a/Examples/examples_general/example8.1.php +++ b/Examples/examples_general/example8.1.php @@ -1,7 +1,7 @@ Add($lineplot); $graph->AddY2($lineplot2); - -$graph->title->Set('Example 8'); +$example_title = 'Example 8'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example8.php b/Examples/examples_general/example8.php old mode 100755 new mode 100644 index 26075d90..41bae1cb --- a/Examples/examples_general/example8.php +++ b/Examples/examples_general/example8.php @@ -1,7 +1,7 @@ Add($lineplot); - -$graph->title->Set('Example 8'); +$example_title = 'Example 8'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example9.1.php b/Examples/examples_general/example9.1.php old mode 100755 new mode 100644 index 1d026b06..3b0b59d9 --- a/Examples/examples_general/example9.1.php +++ b/Examples/examples_general/example9.1.php @@ -1,7 +1,7 @@ Add($lineplot); - -$graph->title->Set('Examples 9'); +$example_title = 'Examples 9'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example9.2.php b/Examples/examples_general/example9.2.php old mode 100755 new mode 100644 index e056555e..c52fcda1 --- a/Examples/examples_general/example9.2.php +++ b/Examples/examples_general/example9.2.php @@ -1,7 +1,7 @@ Add($lineplot); - -$graph->title->Set('Examples 9'); +$example_title = 'Examples 9'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/example9.php b/Examples/examples_general/example9.php old mode 100755 new mode 100644 index dd0bea2d..de16f118 --- a/Examples/examples_general/example9.php +++ b/Examples/examples_general/example9.php @@ -1,7 +1,7 @@ Add($lineplot); - -$graph->title->Set('Examples 9'); +$example_title = 'Examples 9'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_general/exampleex9.php b/Examples/examples_general/exampleex9.php old mode 100755 new mode 100644 index 05ede081..dfd3988e --- a/Examples/examples_general/exampleex9.php +++ b/Examples/examples_general/exampleex9.php @@ -1,7 +1,7 @@ SetColor('orange'); $lineplot2->SetWeight(2); $graph->y2axis->SetColor('orange'); - -$graph->title->Set('Examples 9'); +$example_title = 'Examples 9'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_img/antispamex01.php b/Examples/examples_img/antispamex01.php old mode 100755 new mode 100644 index e1fb5e36..effc3152 --- a/Examples/examples_img/antispamex01.php +++ b/Examples/examples_img/antispamex01.php @@ -1,7 +1,7 @@ xaxis->SetTickLabels($graph->gDateLocale->GetShortMonth()); -$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); +$graph->SetBackgroundCountryFlag('mais', Graph\Configs::getConfig('BGIMG_COPY'), 50); // Set axis titles and fonts $graph->xaxis->title->Set('Year 2002'); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->SetColor('white'); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetColor('navy'); -$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('navy'); //$graph->ygrid->Show(false); $graph->ygrid->SetColor('white@0.5'); // Setup graph title -$graph->title->Set('Using a country flag background'); +$example_title = 'Using a country flag background'; +$graph->title->set($example_title); // Some extra margin (from the top) $graph->title->SetMargin(3); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // Create the three var series we will combine $bplot1 = new Plot\BarPlot($datay1); diff --git a/Examples/examples_img/no_dim_bkgimgflagex4.php b/Examples/examples_img/bkgimgflagex2.php old mode 100755 new mode 100644 similarity index 73% rename from Examples/examples_img/no_dim_bkgimgflagex4.php rename to Examples/examples_img/bkgimgflagex2.php index 588f42fb..f3eb0c30 --- a/Examples/examples_img/no_dim_bkgimgflagex4.php +++ b/Examples/examples_img/bkgimgflagex2.php @@ -1,7 +1,7 @@ SetShadow(); // Apply a perspective transformation at the end -$graph->Set3DPerspective(SKEW3D_LEFT, 350, 320, true); +$graph->Set3DPerspective(Graph\Configs::getConfig('SKEW3D_UP'), 100, 180); // Adjust the position of the legend box $graph->legend->Pos(0.03, 0.10); @@ -37,28 +37,29 @@ // Get localised version of the month names $graph->xaxis->SetTickLabels($graph->gDateLocale->GetShortMonth()); -$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); +$graph->SetBackgroundCountryFlag('mais', Graph\Configs::getConfig('BGIMG_COPY'), 50); // Set axis titles and fonts $graph->xaxis->title->Set('Year 2002'); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->SetColor('white'); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetColor('navy'); -$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('navy'); //$graph->ygrid->Show(false); $graph->ygrid->SetColor('white@0.5'); // Setup graph title -$graph->title->Set('Using a country flag background'); +$example_title = 'Using a country flag background: SKEW3D_UP'; +$graph->title->set($example_title); // Some extra margin (from the top) $graph->title->SetMargin(3); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // Create the three var series we will combine $bplot1 = new Plot\BarPlot($datay1); diff --git a/Examples/examples_img/no_dim_bkgimgflagex5.php b/Examples/examples_img/bkgimgflagex3.php old mode 100755 new mode 100644 similarity index 73% rename from Examples/examples_img/no_dim_bkgimgflagex5.php rename to Examples/examples_img/bkgimgflagex3.php index 6734d059..3a33d879 --- a/Examples/examples_img/no_dim_bkgimgflagex5.php +++ b/Examples/examples_img/bkgimgflagex3.php @@ -1,7 +1,7 @@ SetShadow(); // Apply a perspective transformation at the end -$graph->Set3DPerspective(SKEW3D_RIGHT, 350, 320, true); +$graph->Set3DPerspective(Graph\Configs::getConfig('SKEW3D_DOWN'), 100, 180); // Adjust the position of the legend box $graph->legend->Pos(0.03, 0.10); @@ -37,28 +37,29 @@ // Get localised version of the month names $graph->xaxis->SetTickLabels($graph->gDateLocale->GetShortMonth()); -$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); +$graph->SetBackgroundCountryFlag('mais', Graph\Configs::getConfig('BGIMG_COPY'), 50); // Set axis titles and fonts $graph->xaxis->title->Set('Year 2002'); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->SetColor('white'); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetColor('navy'); -$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('navy'); //$graph->ygrid->Show(false); $graph->ygrid->SetColor('white@0.5'); // Setup graph title -$graph->title->Set('Using a country flag background'); +$example_title = 'Using a country flag background SKEW3D_DOWN'; +$graph->title->set($example_title); // Some extra margin (from the top) $graph->title->SetMargin(3); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // Create the three var series we will combine $bplot1 = new Plot\BarPlot($datay1); diff --git a/Examples/examples_img/no_dim_bkgimgflagex2.php b/Examples/examples_img/bkgimgflagex4.php old mode 100755 new mode 100644 similarity index 73% rename from Examples/examples_img/no_dim_bkgimgflagex2.php rename to Examples/examples_img/bkgimgflagex4.php index ddeed541..96cc1853 --- a/Examples/examples_img/no_dim_bkgimgflagex2.php +++ b/Examples/examples_img/bkgimgflagex4.php @@ -1,7 +1,7 @@ SetShadow(); // Apply a perspective transformation at the end -$graph->Set3DPerspective(SKEW3D_UP, 100, 180); +$graph->Set3DPerspective(Graph\Configs::getConfig('SKEW3D_LEFT'), 350, 320, true); // Adjust the position of the legend box $graph->legend->Pos(0.03, 0.10); @@ -37,28 +37,29 @@ // Get localised version of the month names $graph->xaxis->SetTickLabels($graph->gDateLocale->GetShortMonth()); -$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); +$graph->SetBackgroundCountryFlag('mais', Graph\Configs::getConfig('BGIMG_COPY'), 50); // Set axis titles and fonts $graph->xaxis->title->Set('Year 2002'); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->SetColor('white'); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetColor('navy'); -$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('navy'); //$graph->ygrid->Show(false); $graph->ygrid->SetColor('white@0.5'); // Setup graph title -$graph->title->Set('Using a country flag background'); +$example_title = 'Using a country flag background SKEW3D_LEFT'; +$graph->title->set($example_title); // Some extra margin (from the top) $graph->title->SetMargin(3); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // Create the three var series we will combine $bplot1 = new Plot\BarPlot($datay1); diff --git a/Examples/examples_img/no_dim_bkgimgflagex3.php b/Examples/examples_img/bkgimgflagex5.php old mode 100755 new mode 100644 similarity index 73% rename from Examples/examples_img/no_dim_bkgimgflagex3.php rename to Examples/examples_img/bkgimgflagex5.php index 292c12d2..95b1476f --- a/Examples/examples_img/no_dim_bkgimgflagex3.php +++ b/Examples/examples_img/bkgimgflagex5.php @@ -1,7 +1,7 @@ SetShadow(); // Apply a perspective transformation at the end -$graph->Set3DPerspective(SKEW3D_DOWN, 100, 180); +$graph->Set3DPerspective(Graph\Configs::getConfig('SKEW3D_RIGHT'), 350, 320, true); // Adjust the position of the legend box $graph->legend->Pos(0.03, 0.10); @@ -37,28 +37,29 @@ // Get localised version of the month names $graph->xaxis->SetTickLabels($graph->gDateLocale->GetShortMonth()); -$graph->SetBackgroundCountryFlag('mais', BGIMG_COPY, 50); +$graph->SetBackgroundCountryFlag('mais', Graph\Configs::getConfig('BGIMG_COPY'), 50); // Set axis titles and fonts $graph->xaxis->title->Set('Year 2002'); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->SetColor('white'); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetColor('navy'); -$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('navy'); //$graph->ygrid->Show(false); $graph->ygrid->SetColor('white@0.5'); // Setup graph title -$graph->title->Set('Using a country flag background'); +$example_title = 'Using a country flag background SKEW3D_RIGHT'; +$graph->title->set($example_title); // Some extra margin (from the top) $graph->title->SetMargin(3); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // Create the three var series we will combine $bplot1 = new Plot\BarPlot($datay1); diff --git a/Examples/examples_img/imgmarkerex1.php b/Examples/examples_img/imgmarkerex1.php old mode 100755 new mode 100644 index 2d25c1eb..ebf9b133 --- a/Examples/examples_img/imgmarkerex1.php +++ b/Examples/examples_img/imgmarkerex1.php @@ -1,7 +1,7 @@ tabtitle->Set(' Year 2003 '); -$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); +$graph->tabtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 13); $graph->tabtitle->SetColor('darkred', '#E1E1FF'); // Enable X-grid as well @@ -35,13 +35,13 @@ $p1->SetColor('navy'); // Use an image of favourite car as marker -$p1->mark->SetType(MARK_IMG, __DIR__ . '/../assets/saab_95.jpg', 0.5); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_IMG'), __DIR__ . '/../assets/saab_95.jpg', 0.5); // Displayes value on top of marker image $p1->value->SetFormat('%d mil'); $p1->value->Show(); $p1->value->SetColor('darkred'); -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); // Increase the margin so that the value is printed avove tje // img marker $p1->value->SetMargin(14); diff --git a/Examples/examples_led/ledex1.php b/Examples/examples_led/ledex1.php new file mode 100644 index 00000000..f82d5cf8 --- /dev/null +++ b/Examples/examples_led/ledex1.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL ', Image\Configs::getConfig('LEDC_GREEN')); diff --git a/Examples/examples_led/ledex10.php b/Examples/examples_led/ledex10.php new file mode 100644 index 00000000..1742c8a2 --- /dev/null +++ b/Examples/examples_led/ledex10.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_KHAKI')); diff --git a/Examples/examples_led/ledex11.php b/Examples/examples_led/ledex11.php new file mode 100644 index 00000000..ef900261 --- /dev/null +++ b/Examples/examples_led/ledex11.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_OLIVE')); diff --git a/Examples/examples_led/ledex12.php b/Examples/examples_led/ledex12.php new file mode 100644 index 00000000..61ea2a38 --- /dev/null +++ b/Examples/examples_led/ledex12.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_LIMEGREEN')); diff --git a/Examples/examples_led/ledex13.php b/Examples/examples_led/ledex13.php new file mode 100644 index 00000000..e7230133 --- /dev/null +++ b/Examples/examples_led/ledex13.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_FORESTGREEN')); diff --git a/Examples/examples_led/ledex14.php b/Examples/examples_led/ledex14.php new file mode 100644 index 00000000..663a3636 --- /dev/null +++ b/Examples/examples_led/ledex14.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_TEAL')); diff --git a/Examples/examples_led/ledex15.php b/Examples/examples_led/ledex15.php new file mode 100644 index 00000000..c0f4e9b1 --- /dev/null +++ b/Examples/examples_led/ledex15.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_STEELBLUE')); diff --git a/Examples/examples_led/ledex16.php b/Examples/examples_led/ledex16.php new file mode 100644 index 00000000..b600ee80 --- /dev/null +++ b/Examples/examples_led/ledex16.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_NAVY')); diff --git a/Examples/examples_led/ledex17.php b/Examples/examples_led/ledex17.php new file mode 100644 index 00000000..e3c52c80 --- /dev/null +++ b/Examples/examples_led/ledex17.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_INVERTGRAY')); diff --git a/Examples/examples_led/ledex2.php b/Examples/examples_led/ledex2.php new file mode 100644 index 00000000..7a8ab8eb --- /dev/null +++ b/Examples/examples_led/ledex2.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_RED')); diff --git a/Examples/examples_led/ledex3.php b/Examples/examples_led/ledex3.php new file mode 100644 index 00000000..254c4855 --- /dev/null +++ b/Examples/examples_led/ledex3.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_YELLOW')); diff --git a/Examples/examples_led/no_test_ledex4.1.php b/Examples/examples_led/ledex4.1.php old mode 100755 new mode 100644 similarity index 55% rename from Examples/examples_led/no_test_ledex4.1.php rename to Examples/examples_led/ledex4.1.php index 724cc643..702a0127 --- a/Examples/examples_led/no_test_ledex4.1.php +++ b/Examples/examples_led/ledex4.1.php @@ -1,14 +1,13 @@ SetSupersampling(2); -$led->StrokeNumber('123.', LEDC_RED); +$led->StrokeNumber('123.', Image\Configs::getConfig('LEDC_RED')); diff --git a/Examples/examples_led/no_test_ledex4.2.php b/Examples/examples_led/ledex4.2.php old mode 100755 new mode 100644 similarity index 55% rename from Examples/examples_led/no_test_ledex4.2.php rename to Examples/examples_led/ledex4.2.php index f2cb8f6b..1896528e --- a/Examples/examples_led/no_test_ledex4.2.php +++ b/Examples/examples_led/ledex4.2.php @@ -1,14 +1,13 @@ SetSupersampling(4); -$led->StrokeNumber('123.', LEDC_RED); +$led->StrokeNumber('123.', Image\Configs::getConfig('LEDC_RED')); diff --git a/Examples/examples_led/no_test_ledex4.php b/Examples/examples_led/ledex4.php old mode 100755 new mode 100644 similarity index 55% rename from Examples/examples_led/no_test_ledex4.php rename to Examples/examples_led/ledex4.php index e9bd1170..6163f764 --- a/Examples/examples_led/no_test_ledex4.php +++ b/Examples/examples_led/ledex4.php @@ -1,14 +1,13 @@ SetSupersampling(1); -$led->StrokeNumber('123.', LEDC_RED); +$led->StrokeNumber('123.', Image\Configs::getConfig('LEDC_RED')); diff --git a/Examples/examples_led/ledex5.php b/Examples/examples_led/ledex5.php new file mode 100644 index 00000000..ae785954 --- /dev/null +++ b/Examples/examples_led/ledex5.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_BLUE')); diff --git a/Examples/examples_led/ledex6.php b/Examples/examples_led/ledex6.php new file mode 100644 index 00000000..3d61d28e --- /dev/null +++ b/Examples/examples_led/ledex6.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_GRAY')); diff --git a/Examples/examples_led/ledex7.php b/Examples/examples_led/ledex7.php new file mode 100644 index 00000000..e02eff78 --- /dev/null +++ b/Examples/examples_led/ledex7.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_CHOCOLATE')); diff --git a/Examples/examples_led/ledex8.php b/Examples/examples_led/ledex8.php new file mode 100644 index 00000000..072665b4 --- /dev/null +++ b/Examples/examples_led/ledex8.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_PERU')); diff --git a/Examples/examples_led/ledex9.php b/Examples/examples_led/ledex9.php new file mode 100644 index 00000000..a58fb75f --- /dev/null +++ b/Examples/examples_led/ledex9.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL', Image\Configs::getConfig('LEDC_GOLDENROD')); diff --git a/Examples/examples_led/no_test_ledex_cyrillic.php b/Examples/examples_led/ledex_cyrillic.php old mode 100755 new mode 100644 similarity index 70% rename from Examples/examples_led/no_test_ledex_cyrillic.php rename to Examples/examples_led/ledex_cyrillic.php index 6e46abc6..e4eba754 --- a/Examples/examples_led/no_test_ledex_cyrillic.php +++ b/Examples/examples_led/ledex_cyrillic.php @@ -1,15 +1,14 @@ SetSupersampling(2); $text = 'А' . 'Б' . @@ -27,4 +26,4 @@ 'Н' . 'О' . 'П'; -$led->StrokeNumber($text, LEDC_RED); +$led->StrokeNumber($text, Image\Configs::getConfig('LEDC_RED')); diff --git a/Examples/examples_led/no_test_ledex_cyrillic2.php b/Examples/examples_led/ledex_cyrillic2.php old mode 100755 new mode 100644 similarity index 70% rename from Examples/examples_led/no_test_ledex_cyrillic2.php rename to Examples/examples_led/ledex_cyrillic2.php index 46037162..aeb4dfc5 --- a/Examples/examples_led/no_test_ledex_cyrillic2.php +++ b/Examples/examples_led/ledex_cyrillic2.php @@ -1,15 +1,14 @@ SetSupersampling(2); $text = 'Р' . 'С' . @@ -27,4 +26,4 @@ 'Э' . 'Ю' . 'Я'; -$led->StrokeNumber($text, LEDC_RED); +$led->StrokeNumber($text, Image\Configs::getConfig('LEDC_RED')); diff --git a/Examples/examples_led/no_test_ledex1.php b/Examples/examples_led/no_test_ledex1.php deleted file mode 100755 index 8ea33ac9..00000000 --- a/Examples/examples_led/no_test_ledex1.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_GREEN); diff --git a/Examples/examples_led/no_test_ledex10.php b/Examples/examples_led/no_test_ledex10.php deleted file mode 100755 index 5afbaafe..00000000 --- a/Examples/examples_led/no_test_ledex10.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_KHAKI); diff --git a/Examples/examples_led/no_test_ledex11.php b/Examples/examples_led/no_test_ledex11.php deleted file mode 100755 index d3736bb7..00000000 --- a/Examples/examples_led/no_test_ledex11.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_OLIVE); diff --git a/Examples/examples_led/no_test_ledex12.php b/Examples/examples_led/no_test_ledex12.php deleted file mode 100755 index d92a289a..00000000 --- a/Examples/examples_led/no_test_ledex12.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_LIMEGREEN); diff --git a/Examples/examples_led/no_test_ledex13.php b/Examples/examples_led/no_test_ledex13.php deleted file mode 100755 index 50838090..00000000 --- a/Examples/examples_led/no_test_ledex13.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_FORESTGREEN); diff --git a/Examples/examples_led/no_test_ledex14.php b/Examples/examples_led/no_test_ledex14.php deleted file mode 100755 index 6819202c..00000000 --- a/Examples/examples_led/no_test_ledex14.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_TEAL); diff --git a/Examples/examples_led/no_test_ledex15.php b/Examples/examples_led/no_test_ledex15.php deleted file mode 100755 index 985ddfb9..00000000 --- a/Examples/examples_led/no_test_ledex15.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_STEELBLUE); diff --git a/Examples/examples_led/no_test_ledex16.php b/Examples/examples_led/no_test_ledex16.php deleted file mode 100755 index 05258b7a..00000000 --- a/Examples/examples_led/no_test_ledex16.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_NAVY); diff --git a/Examples/examples_led/no_test_ledex17.php b/Examples/examples_led/no_test_ledex17.php deleted file mode 100755 index 316294d0..00000000 --- a/Examples/examples_led/no_test_ledex17.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_INVERTGRAY); diff --git a/Examples/examples_led/no_test_ledex2.php b/Examples/examples_led/no_test_ledex2.php deleted file mode 100755 index e0d14d7a..00000000 --- a/Examples/examples_led/no_test_ledex2.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_RED); diff --git a/Examples/examples_led/no_test_ledex3.php b/Examples/examples_led/no_test_ledex3.php deleted file mode 100755 index 5381f856..00000000 --- a/Examples/examples_led/no_test_ledex3.php +++ /dev/null @@ -1,14 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_YELLOW); diff --git a/Examples/examples_led/no_test_ledex5.php b/Examples/examples_led/no_test_ledex5.php deleted file mode 100755 index a3fc6c74..00000000 --- a/Examples/examples_led/no_test_ledex5.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_BLUE); diff --git a/Examples/examples_led/no_test_ledex6.php b/Examples/examples_led/no_test_ledex6.php deleted file mode 100755 index f7d4bc5d..00000000 --- a/Examples/examples_led/no_test_ledex6.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_GRAY); diff --git a/Examples/examples_led/no_test_ledex7.php b/Examples/examples_led/no_test_ledex7.php deleted file mode 100755 index 706a952f..00000000 --- a/Examples/examples_led/no_test_ledex7.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_CHOCOLATE); diff --git a/Examples/examples_led/no_test_ledex8.php b/Examples/examples_led/no_test_ledex8.php deleted file mode 100755 index ed38ee8b..00000000 --- a/Examples/examples_led/no_test_ledex8.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_PERU); diff --git a/Examples/examples_led/no_test_ledex9.php b/Examples/examples_led/no_test_ledex9.php deleted file mode 100755 index a9159696..00000000 --- a/Examples/examples_led/no_test_ledex9.php +++ /dev/null @@ -1,13 +0,0 @@ -StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_GOLDENROD); diff --git a/Examples/examples_line/builtinplotmarksex1.php b/Examples/examples_line/builtinplotmarksex1.php old mode 100755 new mode 100644 index 06d26e19..043131e4 --- a/Examples/examples_line/builtinplotmarksex1.php +++ b/Examples/examples_line/builtinplotmarksex1.php @@ -1,7 +1,7 @@ SetFrame(false); // Setup title -$graph->title->Set('Using Builtin PlotMarks'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$example_title = 'Using Builtin PlotMarks'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); // Note: requires jpgraph 1.12p or higher // $graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_PLOT); $graph->tabtitle->Set('Region 1'); -$graph->tabtitle->SetWidth(TABTITLE_WIDTHFULL); +$graph->tabtitle->SetWidth(Graph\Configs::getConfig('TABTITLE_WIDTHFULL')); // Enable X and Y Grid $graph->xgrid->Show(); @@ -40,7 +41,7 @@ $graph->legend->SetColor('navy'); $graph->legend->SetFillColor('lightgreen'); $graph->legend->SetLineWeight(1); -$graph->legend->SetFont(FF_ARIAL, FS_BOLD, 8); +$graph->legend->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 8); $graph->legend->SetShadow('gray@0.4', 3); $graph->legend->SetAbsPos(15, 120, 'right', 'bottom'); @@ -50,7 +51,7 @@ $p1->SetColor('red'); $p1->SetFillColor('yellow@0.5'); $p1->SetWeight(2); -$p1->mark->SetType(MARK_IMG_DIAMOND, 5, 0.6); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_IMG_DIAMOND'), 5, 0.6); $p1->SetLegend('2006'); $graph->Add($p1); @@ -58,11 +59,11 @@ $p2->SetColor('darkgreen'); $p2->SetWeight(2); $p2->SetLegend('2001'); -$p2->mark->SetType(MARK_IMG_MBALL, 'red'); +$p2->mark->SetType(Graph\Configs::getConfig('MARK_IMG_MBALL'), 'red'); $graph->Add($p2); // Add a vertical line at the end scale position '7' -$l1 = new Plot\PlotLine(VERTICAL, 7); +$l1 = new Plot\PlotLine(Graph\Configs::getConfig('VERTICAL'), 7); $graph->Add($l1); // Output the graph diff --git a/Examples/examples_line/centeredlineex01.php b/Examples/examples_line/centeredlineex01.php old mode 100755 new mode 100644 index 67f18467..0d980a1b --- a/Examples/examples_line/centeredlineex01.php +++ b/Examples/examples_line/centeredlineex01.php @@ -1,7 +1,7 @@ img->SetAntiAliasing(); $graph->SetScale('textlin'); $graph->SetShadow(); -$graph->title->Set('Example of line centered plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Example of line centered plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Use 20% "grace" to get slightly larger scale then min/max of // data $graph->yscale->SetGrace(20); $p1 = new Plot\LinePlot($datay); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $p1->SetColor('blue'); diff --git a/Examples/examples_line/centeredlineex02.php b/Examples/examples_line/centeredlineex02.php old mode 100755 new mode 100644 index e7e97d86..88b3e422 --- a/Examples/examples_line/centeredlineex02.php +++ b/Examples/examples_line/centeredlineex02.php @@ -1,7 +1,7 @@ img->SetAntiAliasing(); $graph->SetScale('textlin'); $graph->SetShadow(); -$graph->title->Set('Example of filled line centered plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Example of filled line centered plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\LinePlot($datay); $p1->SetFillColor('green'); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $p1->SetColor('blue'); diff --git a/Examples/examples_line/centeredlineex03.php b/Examples/examples_line/centeredlineex03.php old mode 100755 new mode 100644 index 5a645a37..dabcd427 --- a/Examples/examples_line/centeredlineex03.php +++ b/Examples/examples_line/centeredlineex03.php @@ -1,7 +1,7 @@ img->SetAntiAliasing(); $graph->SetScale('textlin'); $graph->SetShadow(); -$graph->title->Set('Example slanted X-labels'); -$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 14); +$example_title = 'Example slanted X-labels'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_NORMAL'), 14); -$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); $graph->xaxis->SetTickLabels($labels); $graph->xaxis->SetLabelAngle(45); $p1 = new Plot\LinePlot($datay); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $p1->SetColor('blue'); diff --git a/Examples/examples_line/centerlinebarex1.php b/Examples/examples_line/centerlinebarex1.php old mode 100755 new mode 100644 index 49acdd99..c04f0d2c --- a/Examples/examples_line/centerlinebarex1.php +++ b/Examples/examples_line/centerlinebarex1.php @@ -1,7 +1,7 @@ img->SetMargin(40, 80, 40, 40); $graph->SetScale('textlin'); $graph->SetShadow(); - -$graph->title->Set('Center the line points in bars'); +$example_title = 'Center the line points in bars'; +$graph->title->set($example_title); $line = new Plot\LinePlot($ydata); $line->SetBarCenter(); diff --git a/Examples/examples_line/clipping_ex1.php b/Examples/examples_line/clipping_ex1.php old mode 100755 new mode 100644 index 7c240262..8dbeb21c --- a/Examples/examples_line/clipping_ex1.php +++ b/Examples/examples_line/clipping_ex1.php @@ -1,7 +1,7 @@ SetClipping(false); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->ygrid->SetLineStyle('dashed'); - -$graph->title->Set('Manual scale'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$example_title = 'Manual scale'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetColor('white'); -$graph->subtitle->Set('(No clipping)'); +$subtitle_text = '(No clipping)'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); -$graph->subtitle->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); // Create the linear plot $lineplot = new Plot\LinePlot($ydata); diff --git a/Examples/examples_line/clipping_ex2.php b/Examples/examples_line/clipping_ex2.php old mode 100755 new mode 100644 index b24c2180..ec4c5e28 --- a/Examples/examples_line/clipping_ex2.php +++ b/Examples/examples_line/clipping_ex2.php @@ -1,7 +1,7 @@ SetClipping(true); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->ygrid->SetLineStyle('dashed'); - -$graph->title->Set('Manual scale'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$example_title = 'Manual scale'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetColor('white'); -$graph->subtitle->Set('(With clipping)'); +$subtitle_text = '(With clipping)'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); -$graph->subtitle->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); // Create the linear plot $lineplot = new Plot\LinePlot($ydata); diff --git a/Examples/examples_line/filledgridex1.php b/Examples/examples_line/filledgridex1.php old mode 100755 new mode 100644 index 0639d197..f3847058 --- a/Examples/examples_line/filledgridex1.php +++ b/Examples/examples_line/filledgridex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetFrame(false); $graph->SetMargin(30, 50, 30, 30); - -$graph->title->Set('Filled Y-grid'); +$example_title = 'Filled Y-grid'; +$graph->title->set($example_title); $graph->yaxis->HideZeroLabel(); $graph->ygrid->SetFill(true, '#EFEFEF@0.5', '#BBCCFF@0.5'); diff --git a/Examples/examples_line/filledline01.php b/Examples/examples_line/filledline01.php old mode 100755 new mode 100644 index 8883930d..65c14b09 --- a/Examples/examples_line/filledline01.php +++ b/Examples/examples_line/filledline01.php @@ -1,7 +1,7 @@ img->SetMargin(40, 40, 40, 40); $graph->SetScale('textlin'); $graph->SetShadow(); -$graph->title->Set('Example of filled line plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Example of filled line plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\LinePlot($datay); $p1->SetFillColor('orange'); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $graph->Add($p1); diff --git a/Examples/examples_line/filledlineex01.1.php b/Examples/examples_line/filledlineex01.1.php old mode 100755 new mode 100644 index 798193e4..33821f67 --- a/Examples/examples_line/filledlineex01.1.php +++ b/Examples/examples_line/filledlineex01.1.php @@ -1,7 +1,7 @@ img->SetMargin(40, 40, 40, 40); $graph->SetShadow(); -$graph->SetGridDepth(DEPTH_FRONT); - -$graph->title->Set('Example of filled line plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->SetGridDepth(Graph\Configs::getConfig('DEPTH_FRONT')); +$example_title = 'Example of filled line plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\LinePlot($datay); $p1->SetFillColor('orange'); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $graph->Add($p1); diff --git a/Examples/examples_line/filledlineex01.php b/Examples/examples_line/filledlineex01.php old mode 100755 new mode 100644 index 5a7405a2..c222418e --- a/Examples/examples_line/filledlineex01.php +++ b/Examples/examples_line/filledlineex01.php @@ -1,7 +1,7 @@ img->SetMargin(40, 40, 40, 40); $graph->SetShadow(); - -$graph->title->Set('Example of filled line plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Example of filled line plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\LinePlot($datay); $p1->SetFillColor('orange'); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $graph->Add($p1); diff --git a/Examples/examples_line/filledlineex02.php b/Examples/examples_line/filledlineex02.php old mode 100755 new mode 100644 index 8cdbbc44..ad587be5 --- a/Examples/examples_line/filledlineex02.php +++ b/Examples/examples_line/filledlineex02.php @@ -1,7 +1,7 @@ img->SetMargin(40, 40, 40, 40); $graph->SetScale('textlin'); $graph->SetShadow(); -$graph->title->Set('Example of filled line plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->subtitle->Set('(Starting from Y=0)'); +$example_title = 'Example of filled line plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$subtitle_text = '(Starting from Y=0)'; +$graph->subtitle->Set($subtitle_text); $graph->yaxis->scale->SetAutoMin(0); $p1 = new Plot\LinePlot($datay); $p1->SetFillColor('orange'); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $graph->Add($p1); diff --git a/Examples/examples_line/filledlineex03.php b/Examples/examples_line/filledlineex03.php old mode 100755 new mode 100644 index 56e2f371..c999d59d --- a/Examples/examples_line/filledlineex03.php +++ b/Examples/examples_line/filledlineex03.php @@ -1,7 +1,7 @@ SetScale('intlin'); -$graph->title->Set('Filled line with NULL values'); +$example_title = 'Filled line with NULL values'; +$graph->title->set($example_title); //Make sure data starts from Zero whatever data we have $graph->yscale->SetAutoMin(0); diff --git a/Examples/examples_line/filledstepstyleex1.php b/Examples/examples_line/filledstepstyleex1.php old mode 100755 new mode 100644 index a934799c..82c770f3 --- a/Examples/examples_line/filledstepstyleex1.php +++ b/Examples/examples_line/filledstepstyleex1.php @@ -1,7 +1,7 @@ SetMarginColor('antiquewhite'); $graph->img->SetMargin(60, 40, 40, 50); $graph->img->setTransparent('white'); -$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1')); $graph->xaxis->setTextTickInterval(1); $graph->xaxis->SetTextLabelInterval(1); $graph->legend->SetFillColor('antiquewhite'); $graph->legend->SetShadow(true); -$graph->legend->SetLayout(LEGEND_VERT); +$graph->legend->SetLayout(Graph\Configs::getConfig('LEGEND_VERT')); $graph->legend->Pos(0.02, 0.01); -$graph->title->Set('Step Styled Example'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Step Styled Example'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot = new Plot\LinePlot($ydata); $lineplot->SetColor('black'); diff --git a/Examples/examples_line/funcex1.php b/Examples/examples_line/funcex1.php old mode 100755 new mode 100644 index 7cb8e9c3..dd125f06 --- a/Examples/examples_line/funcex1.php +++ b/Examples/examples_line/funcex1.php @@ -1,7 +1,7 @@ SetMarginColor('white'); $graph->SetColor('lightyellow'); -// ... and titles -$graph->title->Set('Example of Function plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// ... and titles$example_title='Example of Function plot'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->subtitle->Set("(With some more advanced axis formatting\nHiding first and last label)"); -$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_NORMAL')); $graph->xgrid->Show(); $graph->yaxis->SetPos(0); $graph->yaxis->SetWeight(2); $graph->yaxis->HideZeroLabel(); -$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('black', 'darkblue'); $graph->yaxis->HideTicks(true, false); $graph->yaxis->HideFirstLastLabel(); @@ -44,7 +43,7 @@ $graph->xaxis->SetWeight(2); $graph->xaxis->HideZeroLabel(); $graph->xaxis->HideFirstLastLabel(); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetColor('black', 'darkblue'); $lp1 = new Plot\LinePlot($ydata, $xdata); diff --git a/Examples/examples_line/funcex2.php b/Examples/examples_line/funcex2.php old mode 100755 new mode 100644 index cc01b610..6dc409a6 --- a/Examples/examples_line/funcex2.php +++ b/Examples/examples_line/funcex2.php @@ -1,7 +1,7 @@ SetBox(true, 'black', 2); $graph->SetMarginColor('white'); $graph->SetColor('lightyellow'); -$graph->SetAxisStyle(AXSTYLE_SIMPLE); +$graph->SetAxisStyle(Graph\Configs::getConfig('AXSTYLE_SIMPLE')); //$graph->xaxis->SetLabelFormat('%.1f'); - -$graph->title->Set('Function plot with marker'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->subtitle->Set('(BOXOUT Axis style)'); -$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$example_title = 'Function plot with marker'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$subtitle_text = 'BOXOUT Axis style)'; +$graph->subtitle->Set($subtitle_text); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_NORMAL')); $lp1 = new Plot\LinePlot($ydata, $xdata); -$lp1->mark->SetType(MARK_FILLEDCIRCLE); +$lp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $lp1->mark->SetFillColor('red'); $lp1->SetColor('blue'); diff --git a/Examples/examples_line/funcex3.php b/Examples/examples_line/funcex3.php old mode 100755 new mode 100644 index 72880d28..c9091dcc --- a/Examples/examples_line/funcex3.php +++ b/Examples/examples_line/funcex3.php @@ -1,7 +1,7 @@ SetBox(true, 'black', 2); $graph->SetMarginColor('white'); $graph->SetColor('lightyellow'); -$graph->SetAxisStyle(AXSTYLE_BOXIN); +$graph->SetAxisStyle(Graph\Configs::getConfig('AXSTYLE_BOXIN')); $graph->xgrid->Show(); //$graph->xaxis->SetLabelFormat('%.0f'); $graph->img->SetMargin(50, 50, 60, 40); - -$graph->title->Set('Function plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->subtitle->Set('(BOXIN Axis style)'); -$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$example_title = 'Function plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$subtitle_text = ' BOXIN Axis style)'; +$graph->subtitle->Set($subtitle_text); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_NORMAL')); $lp1 = new Plot\LinePlot($ydata, $xdata); $lp1->SetColor('blue'); diff --git a/Examples/examples_line/funcex4.php b/Examples/examples_line/funcex4.php old mode 100755 new mode 100644 index 2f9b7860..048ce4fa --- a/Examples/examples_line/funcex4.php +++ b/Examples/examples_line/funcex4.php @@ -1,7 +1,7 @@ SetMarginColor('black'); $graph->SetColor('black'); -// ... and titles -$graph->title->Set('Example of Function plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// ... and titles$example_title='Example of Function plot'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetColor('lightgreen'); $graph->subtitle->Set("(With some more advanced axis formatting\nHiding first and last label)"); -$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_NORMAL')); $graph->subtitle->SetColor('lightgreen'); $graph->xgrid->Show(); @@ -41,7 +40,7 @@ $graph->yaxis->SetPos(0); $graph->yaxis->SetWeight(2); $graph->yaxis->HideZeroLabel(); -$graph->yaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->yaxis->SetColor('green', 'green'); $graph->yaxis->HideTicks(true, true); $graph->yaxis->HideFirstLastLabel(); @@ -49,7 +48,7 @@ $graph->xaxis->SetWeight(2); $graph->xaxis->HideZeroLabel(); $graph->xaxis->HideFirstLastLabel(); -$graph->xaxis->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetColor('green', 'green'); $lp1 = new Plot\LinePlot($ydata, $xdata); diff --git a/Examples/examples_line/gradbkgex1.php b/Examples/examples_line/gradbkgex1.php old mode 100755 new mode 100644 index 03c69317..b7e2765e --- a/Examples/examples_line/gradbkgex1.php +++ b/Examples/examples_line/gradbkgex1.php @@ -1,7 +1,7 @@ SetFrame(true, 'white'); // Setup a background gradient image -$graph->SetBackgroundGradient('blue', 'navy:0.5', GRAD_HOR, BGRAD_PLOT); +$graph->SetBackgroundGradient('blue', 'navy:0.5', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_PLOT')); // Setup the tab title $graph->tabtitle->Set(' 3rd Division '); -$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); +$graph->tabtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 13); // Setup x,Y grid $graph->xgrid->Show(); @@ -42,13 +42,13 @@ $graph->yaxis->SetColor('orange', 'black'); // Ticks on the outsid -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Setup the legend box colors and font $graph->legend->SetColor('white', 'navy'); $graph->legend->SetFillColor('navy@0.25'); -$graph->legend->SetFont(FF_ARIAL, FS_BOLD, 8); +$graph->legend->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 8); $graph->legend->SetShadow('darkgray@0.4', 3); $graph->legend->SetPos(0.05, 0.05, 'right', 'top'); diff --git a/Examples/examples_line/gradlinefillex1.php b/Examples/examples_line/gradlinefillex1.php old mode 100755 new mode 100644 index ece961e8..3b2a81a3 --- a/Examples/examples_line/gradlinefillex1.php +++ b/Examples/examples_line/gradlinefillex1.php @@ -1,7 +1,7 @@ SetMargin(40, 40, 20, 30); $graph->SetScale('intlin'); $graph->SetMarginColor('darkgreen@0.8'); - -$graph->title->Set('Gradient filled line plot'); +$example_title = 'Gradient filled line plot'; +$graph->title->set($example_title); $graph->yscale->SetAutoMin(0); // Create the line diff --git a/Examples/examples_line/gradlinefillex2.php b/Examples/examples_line/gradlinefillex2.php old mode 100755 new mode 100644 index 2507ccba..bda0a09f --- a/Examples/examples_line/gradlinefillex2.php +++ b/Examples/examples_line/gradlinefillex2.php @@ -1,7 +1,7 @@ SetMarginColor('darkgreen@0.8'); // Setup a background gradient image -$graph->SetBackgroundGradient('darkred', 'yellow', GRAD_HOR, BGRAD_PLOT); - -$graph->title->Set('Gradient filled line plot ex2'); +$graph->SetBackgroundGradient('darkred', 'yellow', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_PLOT')); +$example_title = 'Gradient filled line plot ex2'; +$graph->title->set($example_title); $graph->yscale->SetAutoMin(0); // Create the line diff --git a/Examples/examples_line/gradlinefillex3.php b/Examples/examples_line/gradlinefillex3.php old mode 100755 new mode 100644 index 23aa0b36..9a380d5e --- a/Examples/examples_line/gradlinefillex3.php +++ b/Examples/examples_line/gradlinefillex3.php @@ -1,7 +1,7 @@ SetMarginColor('darkgreen@0.8'); // Setup a background gradient image -$graph->SetBackgroundGradient('darkred', 'yellow', GRAD_HOR, BGRAD_PLOT); - -$graph->title->Set('Gradient filled line plot ex3'); +$graph->SetBackgroundGradient('darkred', 'yellow', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_PLOT')); +$example_title = 'Gradient filled line plot ex3'; +$graph->title->set($example_title); $graph->yscale->SetAutoMin(0); // Create the line diff --git a/Examples/examples_line/gradlinefillex4.php b/Examples/examples_line/gradlinefillex4.php old mode 100755 new mode 100644 index 7add2a48..65ed93c4 --- a/Examples/examples_line/gradlinefillex4.php +++ b/Examples/examples_line/gradlinefillex4.php @@ -1,7 +1,7 @@ SetMarginColor('darkgreen@0.8'); // Setup a background gradient image -$graph->SetBackgroundGradient('darkred', 'yellow', GRAD_HOR, BGRAD_PLOT); - -$graph->title->Set('Gradient filled line plot ex2'); +$graph->SetBackgroundGradient('darkred', 'yellow', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_PLOT')); +$example_title = 'Gradient filled line plot ex2'; +$graph->title->set($example_title); $graph->yscale->SetAutoMin(0); // Create the line diff --git a/Examples/examples_line/interpolation-growth-log.php b/Examples/examples_line/interpolation-growth-log.php old mode 100755 new mode 100644 index 774ac4d6..65c586d1 --- a/Examples/examples_line/interpolation-growth-log.php +++ b/Examples/examples_line/interpolation-growth-log.php @@ -1,7 +1,7 @@ SetBox(true, 'black', 2); $graph->SetMarginColor('white'); $graph->SetColor('lightyellow@0.7'); - -$graph->title->Set('Interpolation growth for size 10x10'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Interpolation growth for size 10x10'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetTitle('Interpolation factor', 'center'); $graph->xaxis->SetTitleMargin(10); -$graph->SetAxisStyle(AXSTYLE_YBOXIN); +$graph->SetAxisStyle(Graph\Configs::getConfig('AXSTYLE_YBOXIN')); $graph->xgrid->Show(); $lp1 = new Plot\LinePlot($ydata, $xdata); diff --git a/Examples/examples_line/interpolation-growth.php b/Examples/examples_line/interpolation-growth.php old mode 100755 new mode 100644 index b3176625..a1993618 --- a/Examples/examples_line/interpolation-growth.php +++ b/Examples/examples_line/interpolation-growth.php @@ -1,7 +1,7 @@ SetBox(true, 'black', 2); $graph->SetMarginColor('white'); $graph->SetColor('lightyellow@0.7'); - -$graph->title->Set('Interpolation growth for size 10x10'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Interpolation growth for size 10x10'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->SetTitle('Interpolation factor', 'center'); $graph->xaxis->SetTitleMargin(10); -$graph->SetAxisStyle(AXSTYLE_YBOXIN); +$graph->SetAxisStyle(Graph\Configs::getConfig('AXSTYLE_YBOXIN')); $graph->xgrid->Show(); $lp1 = new Plot\LinePlot($ydata, $xdata); diff --git a/Examples/examples_line/linebarcentex1.php b/Examples/examples_line/linebarcentex1.php old mode 100755 new mode 100644 index dd6e30e2..e37cbd8f --- a/Examples/examples_line/linebarcentex1.php +++ b/Examples/examples_line/linebarcentex1.php @@ -1,7 +1,7 @@ Add($bplot); $graph->Add($l1plot); - -$graph->title->Set('Adding a line plot to a bar graph v1'); +$example_title = 'Adding a line plot to a bar graph v1'; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Display the graph $graph->Stroke(); diff --git a/Examples/examples_line/linebarex1.php b/Examples/examples_line/linebarex1.php old mode 100755 new mode 100644 index 74110dff..3bb642ee --- a/Examples/examples_line/linebarex1.php +++ b/Examples/examples_line/linebarex1.php @@ -1,7 +1,7 @@ SetBackgroundImage(__DIR__ . '/../assets/tiger_bkg.png', BGIMG_FILLFRAME); +$graph->SetBackgroundImage(__DIR__ . '/../assets/tiger_bkg.png', Graph\Configs::getConfig('BGIMG_FILLFRAME')); $graph->SetShadow(); // Use an integer X-scale $graph->SetScale('textlin'); // Set title and subtitle -$graph->title->Set('Combined bar and line plot'); +$example_title = 'Combined bar and line plot'; +$graph->title->set($example_title); $graph->subtitle->Set("100 data points, X-Scale: 'text'"); // Use built in font -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Make the margin around the plot a little bit bigger // then default diff --git a/Examples/examples_line/linebarex2.php b/Examples/examples_line/linebarex2.php old mode 100755 new mode 100644 index f8d3c2b7..81dc1ce9 --- a/Examples/examples_line/linebarex2.php +++ b/Examples/examples_line/linebarex2.php @@ -1,7 +1,7 @@ SetBackgroundImage(__DIR__ . '/../assets/tiger_bkg.png', BGIMG_FILLFRAME); +$graph->SetBackgroundImage(__DIR__ . '/../assets/tiger_bkg.png', Graph\Configs::getConfig('BGIMG_FILLFRAME')); $graph->SetShadow(); // Use an integer X-scale $graph->SetScale('intlin'); // Set title and subtitle -$graph->title->Set('Combined bar and line plot'); -$graph->subtitle->Set('("left" aligned bars)'); +$example_title = 'Combined bar and line plot'; +$graph->title->set($example_title); +$subtitle_text = 'left aligned bars'; +$graph->subtitle->Set($subtitle_text); // Use built in font -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Make the margin around the plot a little bit bigger // then default diff --git a/Examples/examples_line/linebarex3.php b/Examples/examples_line/linebarex3.php old mode 100755 new mode 100644 index c769fbc9..134f994e --- a/Examples/examples_line/linebarex3.php +++ b/Examples/examples_line/linebarex3.php @@ -1,7 +1,7 @@ img->SetMargin(40, 180, 40, 40); -$graph->SetBackgroundImage(__DIR__ . '/../assets/tiger_bkg.png', BGIMG_FILLFRAME); +$graph->SetBackgroundImage(__DIR__ . '/../assets/tiger_bkg.png', Graph\Configs::getConfig('BGIMG_FILLFRAME')); //$graph->img->SetAntiAliasing(); $graph->SetScale('intlin'); $graph->SetShadow(); -$graph->title->Set('Combined bar and line plot'); -$graph->subtitle->Set('("center" aligned bars)'); +$example_title = 'Combined bar and line plot'; +$graph->title->set($example_title); +$subtitle_text = 'center aligned bars'; +$graph->subtitle->Set($subtitle_text); // Use built in font -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Slightly adjust the legend from it's default position in the // top right corner. diff --git a/Examples/examples_line/linegraceex.php b/Examples/examples_line/linegraceex.php old mode 100755 new mode 100644 index 862cbd6a..bb03ebd8 --- a/Examples/examples_line/linegraceex.php +++ b/Examples/examples_line/linegraceex.php @@ -1,7 +1,7 @@ img->SetAntiAliasing(); $graph->SetScale('textlin'); $graph->SetShadow(); -$graph->title->Set('Example of 10% top/bottom grace'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Example of 10% top/bottom grace'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Add 10% grace to top and bottom of plot $graph->yscale->SetGrace(10, 10); $p1 = new Plot\LinePlot($datay); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $p1->SetColor('blue'); diff --git a/Examples/examples_line/lineimagefillex1.php b/Examples/examples_line/lineimagefillex1.php old mode 100755 new mode 100644 index 4b77366b..97a92904 --- a/Examples/examples_line/lineimagefillex1.php +++ b/Examples/examples_line/lineimagefillex1.php @@ -1,7 +1,7 @@ title->Set('Education growth'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$__width = 320; +$__height = 200; +$graph = new Graph\Graph($__width, $__height); +$example_title = 'Education growth'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->SetScale('intlin'); $graph->SetMarginColor('white'); $graph->SetBox(); //$graph->img->SetAntialiasing(); -$graph->SetGridDepth(DEPTH_FRONT); +$graph->SetGridDepth(Graph\Configs::getConfig('DEPTH_FRONT')); $graph->ygrid->SetColor('gray@0.7'); -$graph->SetBackgroundImage(__DIR__ . '/../assets/classroom.jpg', BGIMG_FILLPLOT); +$graph->SetBackgroundImage(__DIR__ . '/../assets/classroom.jpg', Graph\Configs::getConfig('BGIMG_FILLPLOT')); // Masking graph $p1 = new Plot\LinePlot($datay); @@ -36,7 +37,7 @@ $p2 = new Plot\LinePlot($datay); $p2->SetColor('black@0.4'); $p2->SetWeight(3); -$p2->mark->SetType(MARK_SQUARE); +$p2->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $p2->mark->SetColor('orange@0.5'); $p2->mark->SetFillColor('orange@0.3'); $graph->Add($p2); diff --git a/Examples/examples_line/linlogex1.php b/Examples/examples_line/linlogex1.php old mode 100755 new mode 100644 index 59fbd021..650f10d8 --- a/Examples/examples_line/linlogex1.php +++ b/Examples/examples_line/linlogex1.php @@ -1,7 +1,7 @@ SetScale('linlog'); $graph->img->SetMargin(40, 20, 20, 40); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->Set('ab/2'); $graph->yaxis->title->Set('rho_s'); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->ygrid->Show(true, true); $graph->xgrid->Show(true, true); diff --git a/Examples/examples_line/manscaleex1.php b/Examples/examples_line/manscaleex1.php old mode 100755 new mode 100644 index 7e4b8739..cbfb91ac --- a/Examples/examples_line/manscaleex1.php +++ b/Examples/examples_line/manscaleex1.php @@ -1,7 +1,7 @@ SetScale('textlin', 3, 35); $graph->yscale->ticks->Set(8, 2); - -$graph->title->Set('Manual scale, manual ticks'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Manual scale, manual ticks'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $line = new Plot\LinePlot($ydata); $graph->Add($line); diff --git a/Examples/examples_line/manscaleex2.php b/Examples/examples_line/manscaleex2.php old mode 100755 new mode 100644 index 14682e01..ce9a5645 --- a/Examples/examples_line/manscaleex2.php +++ b/Examples/examples_line/manscaleex2.php @@ -1,7 +1,7 @@ SetScale('textlin', 3, 35); - -$graph->title->Set('Manual scale, exact limits'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Manual scale, exact limits'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $line = new Plot\LinePlot($ydata); $graph->Add($line); diff --git a/Examples/examples_line/manscaleex3.php b/Examples/examples_line/manscaleex3.php old mode 100755 new mode 100644 index f4735227..e9accc2b --- a/Examples/examples_line/manscaleex3.php +++ b/Examples/examples_line/manscaleex3.php @@ -1,7 +1,7 @@ SetScale('textlin', 3, 35); -$graph->SetTickDensity(TICKD_DENSE); +$graph->SetTickDensity(Graph\Configs::getConfig('TICKD_DENSE')); $graph->yscale->SetAutoTicks(); - -$graph->title->Set('Manual scale, auto ticks'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Manual scale, auto ticks'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $line = new Plot\LinePlot($ydata); $graph->Add($line); diff --git a/Examples/examples_line/manscaleex4.php b/Examples/examples_line/manscaleex4.php old mode 100755 new mode 100644 index adebdc9f..db5f1b6b --- a/Examples/examples_line/manscaleex4.php +++ b/Examples/examples_line/manscaleex4.php @@ -1,7 +1,7 @@ SetScale('textlin', 3, 35); $graph->yscale->SetAutoTicks(); - -$graph->title->Set('Manual scale, allow adjustment'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Manual scale, allow adjustment'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $line = new Plot\LinePlot($ydata); $graph->Add($line); diff --git a/Examples/examples_line/new_line3.php b/Examples/examples_line/new_line3.php old mode 100755 new mode 100644 index a7644380..c1fa1e04 --- a/Examples/examples_line/new_line3.php +++ b/Examples/examples_line/new_line3.php @@ -1,7 +1,7 @@ SetTheme($theme_class); - -$graph->title->Set('Filled Area'); +$example_title = 'Filled Area'; +$graph->title->set($example_title); $graph->SetBox(false); $graph->yaxis->HideLine(false); @@ -38,11 +38,11 @@ $graph->Add($p2); // Use an image of favourite car as marker -$p1->mark->SetType(MARK_IMG, __DIR__ . '/../assets/rose.gif', 1.0); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_IMG'), __DIR__ . '/../assets/rose.gif', 1.0); $p1->SetLegend('rose'); $p1->SetColor('#CD5C5C'); -$p2->mark->SetType(MARK_IMG, __DIR__ . '/../assets/sunflower.gif', 1.0); +$p2->mark->SetType(Graph\Configs::getConfig('MARK_IMG'), __DIR__ . '/../assets/sunflower.gif', 1.0); $p2->SetLegend('sunflower'); $p2->SetColor('#CD5C5C'); diff --git a/Examples/examples_line/no_dim_plotlineex1.php b/Examples/examples_line/no_dim_plotlineex1.php old mode 100755 new mode 100644 index e50db2c4..c50eb10b --- a/Examples/examples_line/no_dim_plotlineex1.php +++ b/Examples/examples_line/no_dim_plotlineex1.php @@ -1,7 +1,7 @@ SetMargin(40, 20, 50, 70); $graph->legend->SetPos(0.5, 0.97, 'center', 'bottom'); +$example_title = 'Plot line legend'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); -$graph->title->Set('Plot line legend'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); - -$graph->SetTitleBackground('lightblue:1.3', TITLEBKG_STYLE2, TITLEBKG_FRAME_BEVEL); -$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED, 'lightblue', 'navy'); +$graph->SetTitleBackground('lightblue:1.3', Graph\Configs::getConfig('TITLEBKG_STYLE2'), Graph\Configs::getConfig('TITLEBKG_FRAME_BEVEL')); +$graph->SetTitleBackgroundFillStyle(Graph\Configs::getConfig('TITLEBKG_FILLSTYLE_HSTRIPED'), 'lightblue', 'navy'); // Create a bar pot $bplot = new Plot\BarPlot($datay); $bplot->value->Show(); -$bplot->value->SetFont(FF_VERDANA, FS_BOLD, 8); +$bplot->value->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 8); $bplot->SetValuePos('top'); $bplot->SetLegend('Bar Legend'); $graph->Add($bplot); -$pline = new Plot\PlotLine(HORIZONTAL, 8, 'red', 2); +$pline = new Plot\PlotLine(Graph\Configs::getConfig('HORIZONTAL'), 8, 'red', 2); $pline->SetLegend('Line Legend'); $graph->legend->SetColumns(10); $graph->Add($pline); diff --git a/Examples/examples_line/no_test_lineiconex1.php b/Examples/examples_line/no_test_lineiconex1.php old mode 100755 new mode 100644 index 248047ca..c6cf48bf --- a/Examples/examples_line/no_test_lineiconex1.php +++ b/Examples/examples_line/no_test_lineiconex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->title->Set('Adding an icon ("tux") in the background'); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); //$graph->SetBackgroundGradient('red','blue'); diff --git a/Examples/examples_line/no_test_lineiconex2.php b/Examples/examples_line/no_test_lineiconex2.php old mode 100755 new mode 100644 index 075ff6d1..bb598fae --- a/Examples/examples_line/no_test_lineiconex2.php +++ b/Examples/examples_line/no_test_lineiconex2.php @@ -1,7 +1,7 @@ SetMargin(40, 40, 20, 30); $graph->SetScale('textlin'); - -$graph->title->Set('Adding a country flag as a an icon'); +$example_title = 'Adding a country flag as a an icon'; +$graph->title->set($example_title); $p1 = new Plot\LinePlot($datay); $p1->SetColor('blue'); diff --git a/Examples/examples_line/no_test_new_line1.php b/Examples/examples_line/no_test_new_line1.php old mode 100755 new mode 100644 index 9e0f6915..30bc5727 --- a/Examples/examples_line/no_test_new_line1.php +++ b/Examples/examples_line/no_test_new_line1.php @@ -1,7 +1,7 @@ SetTheme($theme_class); $graph->img->SetAntiAliasing(false); -$graph->title->Set('Filled Y-grid'); +$example_title = 'Filled Y-grid'; +$graph->title->set($example_title); $graph->SetBox(false); $graph->img->SetAntiAliasing(); diff --git a/Examples/examples_line/no_test_new_line2.php b/Examples/examples_line/no_test_new_line2.php old mode 100755 new mode 100644 index 9fb78ffe..12b0c5f7 --- a/Examples/examples_line/no_test_new_line2.php +++ b/Examples/examples_line/no_test_new_line2.php @@ -1,7 +1,7 @@ SetTheme($theme_class); - -$graph->title->Set('Background Image'); +$example_title = 'Background Image'; +$graph->title->set($example_title); $graph->SetBox(false); $graph->yaxis->HideZeroLabel(); @@ -29,7 +29,7 @@ $graph->xaxis->SetTickLabels(['A', 'B', 'C', 'D']); $graph->ygrid->SetFill(false); -$graph->SetBackgroundImage(__DIR__ . '/../assets/tiger_bkg.png', BGIMG_FILLFRAME); +$graph->SetBackgroundImage(__DIR__ . '/../assets/tiger_bkg.png', Graph\Configs::getConfig('BGIMG_FILLFRAME')); $p1 = new Plot\LinePlot($datay1); $graph->Add($p1); @@ -39,14 +39,14 @@ $p1->SetColor('#55bbdd'); $p1->SetLegend('Line 1'); -$p1->mark->SetType(MARK_FILLEDCIRCLE, '', 1.0); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE'), '', 1.0); $p1->mark->SetColor('#55bbdd'); $p1->mark->SetFillColor('#55bbdd'); $p1->SetCenter(); $p2->SetColor('#aaaaaa'); $p2->SetLegend('Line 2'); -$p2->mark->SetType(MARK_UTRIANGLE, '', 1.0); +$p2->mark->SetType(Graph\Configs::getConfig('MARK_UTRIANGLE'), '', 1.0); $p2->mark->SetColor('#aaaaaa'); $p2->mark->SetFillColor('#aaaaaa'); $p2->value->SetMargin(14); diff --git a/Examples/examples_line/no_test_new_line4.php b/Examples/examples_line/no_test_new_line4.php old mode 100755 new mode 100644 index 65fc36ac..1b7ddc73 --- a/Examples/examples_line/no_test_new_line4.php +++ b/Examples/examples_line/no_test_new_line4.php @@ -1,7 +1,7 @@ SetTheme($theme_class); - -$graph->title->Set('Line Plots with Markers'); +$example_title = 'Line Plots with Markers'; +$graph->title->set($example_title); $graph->SetBox(false); $graph->ygrid->SetFill(false); @@ -38,13 +38,13 @@ $graph->Add($p2); // Use an image of favourite car as marker -$p1->mark->SetType(MARK_IMG, __DIR__ . '/../assets/new1.gif', 0.8); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_IMG'), __DIR__ . '/../assets/new1.gif', 0.8); $p1->SetColor('#aadddd'); $p1->value->SetFormat('%d'); $p1->value->Show(); $p1->value->SetColor('#55bbdd'); -$p2->mark->SetType(MARK_IMG, __DIR__ . '/../assets/new2.gif', 0.8); +$p2->mark->SetType(Graph\Configs::getConfig('MARK_IMG'), __DIR__ . '/../assets/new2.gif', 0.8); $p2->SetColor('#ddaa99'); $p2->value->SetFormat('%d'); $p2->value->Show(); diff --git a/Examples/examples_line/no_test_new_line5.php b/Examples/examples_line/no_test_new_line5.php old mode 100755 new mode 100644 index b5f728f3..2ca76621 --- a/Examples/examples_line/no_test_new_line5.php +++ b/Examples/examples_line/no_test_new_line5.php @@ -1,7 +1,7 @@ SetTheme($theme_class); $graph->SetMargin(40, 40, 50, 40); - -$graph->title->Set('Inverted Y-axis'); +$example_title = 'Inverted Y-axis'; +$graph->title->set($example_title); $graph->SetBox(false); $graph->yaxis->HideLine(false); $graph->yaxis->HideTicks(false, false); // For background to be gradient, setfill is needed first. $graph->ygrid->SetFill(true, '#FFFFFF@0.5', '#FFFFFF@0.5'); -$graph->SetBackgroundGradient('#FFFFFF', '#00FF7F', GRAD_HOR, BGRAD_PLOT); +$graph->SetBackgroundGradient('#FFFFFF', '#00FF7F', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_PLOT')); $graph->xaxis->SetTickLabels(['G', 'F', 'E', 'D', 'C', 'B', 'A']); $graph->xaxis->SetLabelMargin(20); $graph->yaxis->SetLabelMargin(20); -$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->SetAxisStyle(Graph\Configs::getConfig('AXSTYLE_BOXOUT')); $graph->img->SetAngle(180); // Create the line diff --git a/Examples/examples_line/no_test_new_step1.php b/Examples/examples_line/no_test_new_step1.php old mode 100755 new mode 100644 index 1c42d2d3..40144daf --- a/Examples/examples_line/no_test_new_step1.php +++ b/Examples/examples_line/no_test_new_step1.php @@ -1,7 +1,7 @@ SetTheme($theme_class); $graph->SetBox(false); - -$graph->title->Set('Step Line'); +$example_title = 'Step Line'; +$graph->title->set($example_title); $graph->ygrid->Show(true); $graph->xgrid->Show(false); $graph->yaxis->HideZeroLabel(); $graph->ygrid->SetFill(true, '#FFFFFF@0.5', '#FFFFFF@0.5'); -$graph->SetBackgroundGradient('blue', '#55eeff', GRAD_HOR, BGRAD_PLOT); +$graph->SetBackgroundGradient('blue', '#55eeff', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_PLOT')); $graph->xaxis->SetTickLabels(['A', 'B', 'C', 'D', 'E', 'F', 'G']); // Create the line diff --git a/Examples/examples_line/nullvalueex01.php b/Examples/examples_line/nullvalueex01.php old mode 100755 new mode 100644 index d8e566ca..1cbba960 --- a/Examples/examples_line/nullvalueex01.php +++ b/Examples/examples_line/nullvalueex01.php @@ -1,7 +1,7 @@ SetShadow(); //Setup title -$graph->title->Set('Line plot with null values'); +$example_title = 'Line plot with null values'; +$graph->title->set($example_title); // Use built in font -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 14); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 14); // Slightly adjust the legend from it's default position $graph->legend->Pos(0.03, 0.5, 'right', 'center'); -$graph->legend->SetFont(FF_FONT1, FS_BOLD); +$graph->legend->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Setup X-scale $graph->xaxis->SetTickLabels($datax); -$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $graph->xaxis->SetLabelAngle(45); // Create the first line $p1 = new Plot\LinePlot($datay); -$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $p1->mark->SetFillColor('red'); $p1->mark->SetWidth(4); $p1->SetColor('blue'); @@ -48,7 +49,7 @@ // ... and the second $p2 = new Plot\LinePlot($data2y); -$p2->mark->SetType(MARK_STAR); +$p2->mark->SetType(Graph\Configs::getConfig('MARK_STAR')); $p2->mark->SetFillColor('red'); $p2->mark->SetWidth(4); $p2->SetColor('red'); diff --git a/Examples/examples_line/partiallyfilledlineex1.php b/Examples/examples_line/partiallyfilledlineex1.php old mode 100755 new mode 100644 index 806e78e5..de0f1bcd --- a/Examples/examples_line/partiallyfilledlineex1.php +++ b/Examples/examples_line/partiallyfilledlineex1.php @@ -1,7 +1,7 @@ legend->SetShadow(true); // Setup title -$graph->title->Set('Filled Area Example'); -$graph->title->SetFont(FF_FONT2, FS_BOLD); +$example_title = 'Filled Area Example'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); // Setup semi-filled line plot $lineplot = new Plot\LinePlot($ydata); @@ -35,11 +36,11 @@ $lineplot->SetColor('black'); // Setup the two areas to be filled -$lineplot->AddArea(2, 5, LP_AREA_FILLED, 'red'); -$lineplot->AddArea(6, 8, LP_AREA_FILLED, 'green'); +$lineplot->AddArea(2, 5, Graph\Configs::getConfig('LP_AREA_FILLED'), 'red'); +$lineplot->AddArea(6, 8, Graph\Configs::getConfig('LP_AREA_FILLED'), 'green'); // Display the marks on the lines -$lineplot->mark->SetType(MARK_DIAMOND); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_DIAMOND')); $lineplot->mark->SetSize(8); $lineplot->mark->Show(); diff --git a/Examples/examples_line/splineex1.php b/Examples/examples_line/splineex1.php old mode 100755 new mode 100644 index e37f7923..793bdd04 --- a/Examples/examples_line/splineex1.php +++ b/Examples/examples_line/splineex1.php @@ -1,7 +1,7 @@ SetMargin(30, 20, 40, 30); -$g->title->Set('Natural cubic splines'); -$g->title->SetFont(FF_ARIAL, FS_NORMAL, 12); -$g->subtitle->Set('(Control points shown in red)'); +$example_title = 'Natural cubic splines'; +$g->title->set($example_title); +$g->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); +$subtitle_text = '(Control points shown in red)'; +$g->subtitle->Set($subtitle_text); $g->subtitle->SetColor('darkred'); $g->SetMarginColor('lightblue'); diff --git a/Examples/examples_line/staticlinebarex1.php b/Examples/examples_line/staticlinebarex1.php old mode 100755 new mode 100644 index ae34eeda..e786d402 --- a/Examples/examples_line/staticlinebarex1.php +++ b/Examples/examples_line/staticlinebarex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetShadow(); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); -$graph->title->Set('Cash flow '); -$graph->subtitle->Set('(Department X)'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 15); +$example_title = 'Cash flow '; +$graph->title->set($example_title); +$subtitle_text = '(Department X)'; +$graph->subtitle->Set($subtitle_text); // Show both X and Y grid $graph->xgrid->Show(true, false); @@ -29,8 +31,8 @@ $graph->yscale->SetGrace(10, 10); // Turn the tick mark out from the plot area -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Create a bar pot $bplot = new Plot\BarPlot($datay); @@ -48,14 +50,14 @@ $graph->Add($bplot); // Add mark graph with static lines -$graph->AddLine(new Plot\PlotLine(HORIZONTAL, 0, 'black', 2)); -$graph->AddLine(new Plot\PlotLine(VERTICAL, 3, 'black', 2)); +$graph->AddLine(new Plot\PlotLine(Graph\Configs::getConfig('HORIZONTAL'), 0, 'black', 2)); +$graph->AddLine(new Plot\PlotLine(Graph\Configs::getConfig('VERTICAL'), 3, 'black', 2)); //$graph->title->Set("Test of bar gradient fill"); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $graph->Stroke(); diff --git a/Examples/examples_line/tabtitleex1.php b/Examples/examples_line/tabtitleex1.php old mode 100755 new mode 100644 index 0b4d121b..c3c9039b --- a/Examples/examples_line/tabtitleex1.php +++ b/Examples/examples_line/tabtitleex1.php @@ -1,7 +1,7 @@ SetMargin(30, 50, 30, 30); $graph->tabtitle->Set(' Year 2003 '); -$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); +$graph->tabtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 13); $graph->yaxis->HideZeroLabel(); $graph->ygrid->SetFill(true, '#EFEFEF@0.5', '#BBCCFF@0.5'); diff --git a/Examples/examples_line/timestampex01.php b/Examples/examples_line/timestampex01.php old mode 100755 new mode 100644 index 04948a93..8c275af2 --- a/Examples/examples_line/timestampex01.php +++ b/Examples/examples_line/timestampex01.php @@ -1,7 +1,7 @@ SetScale('intlin', 0, 0, $adjstart, $adjend); -$graph->title->Set('Example on TimeStamp Callback'); +$example_title = 'Example on TimeStamp Callback'; +$graph->title->set($example_title); // Setup the callback and adjust the angle of the labels $graph->xaxis->SetLabelFormatCallback('TimeCallback'); diff --git a/Examples/examples_line/titleex1.php b/Examples/examples_line/titleex1.php old mode 100755 new mode 100644 index 58d0a104..f683f4f8 --- a/Examples/examples_line/titleex1.php +++ b/Examples/examples_line/titleex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetMargin(25, 10, 30, 30); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); -$graph->title->Set('The Title'); -$graph->subtitle->SetFont(FF_ARIAL, FS_BOLD, 10); -$graph->subtitle->Set('The Subtitle'); -$graph->subsubtitle->SetFont(FF_ARIAL, FS_ITALIC, 9); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); +$example_title = 'The Title'; +$graph->title->set($example_title); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); +$subtitle_text = 'The Subtitle'; +$graph->subtitle->Set($subtitle_text); +$graph->subsubtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_ITALIC'), 9); $graph->subsubtitle->Set('The Subsubitle'); // Create the linear plot diff --git a/Examples/examples_line/y2synch.php b/Examples/examples_line/y2synch.php old mode 100755 new mode 100644 index 18c60d37..ed293386 --- a/Examples/examples_line/y2synch.php +++ b/Examples/examples_line/y2synch.php @@ -1,7 +1,7 @@ SetY2Scale('lin'); // Y2 axis // Overall graph title -$graph->title->Set('Synchronized Y & Y2 scales'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$example_title = 'Synchronized Y & Y2 scales'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); // Title for X-axis $graph->xaxis->title->Set('Measurement'); $graph->xaxis->title->SetMargin(5); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Create Y data set $lplot = new Plot\LinePlot($datay); $graph->yaxis->title->Set('Celcius (C)'); $graph->yaxis->title->SetMargin(5); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // ... and add the plot to the Y-axis $graph->Add($lplot); @@ -55,7 +56,7 @@ function toCelcius($aVal) $l2plot->SetWeight(0); $graph->y2axis->title->Set('Fahrenheit (F)'); $graph->y2axis->title->SetMargin(5); // Some extra margin to clear labels -$graph->y2axis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->y2axis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); $graph->y2axis->SetLabelFormatCallback('toFahrenheit'); $graph->y2axis->SetColor('navy'); diff --git a/Examples/examples_line/y2synch2.php b/Examples/examples_line/y2synch2.php old mode 100755 new mode 100644 index 741909d1..6cc5d871 --- a/Examples/examples_line/y2synch2.php +++ b/Examples/examples_line/y2synch2.php @@ -1,7 +1,7 @@ SetY2Scale('lin'); // Y2 axis // Overall graph title -$graph->title->Set('Synchronized Y & Y2 scales'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$example_title = 'Synchronized Y & Y2 scales'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); // Title for X-axis $graph->xaxis->title->Set('Measurement'); $graph->xaxis->title->SetMargin(5); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Create Y data set $lplot = new Plot\BarPlot($datay); $graph->yaxis->title->Set('Celcius (C)'); $graph->yaxis->title->SetMargin(5); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // ... and add the plot to the Y-axis $graph->Add($lplot); @@ -55,7 +56,7 @@ function toCelcius($aVal) $l2plot->SetWeight(0); $graph->y2axis->title->Set('Fahrenheit (F)'); $graph->y2axis->title->SetMargin(5); // Some extra margin to clear labels -$graph->y2axis->title->SetFont(FF_ARIAL, FS_NORMAL, 11); +$graph->y2axis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); $graph->y2axis->SetLabelFormatCallback('toFahrenheit'); $graph->y2axis->SetColor('navy'); diff --git a/Examples/examples_matrix/no_test_matrix_edgeex01.php b/Examples/examples_matrix/no_test_matrix_edgeex01.php old mode 100755 new mode 100644 index 82741699..5f4397d3 --- a/Examples/examples_matrix/no_test_matrix_edgeex01.php +++ b/Examples/examples_matrix/no_test_matrix_edgeex01.php @@ -1,13 +1,12 @@ SetMarginColor('white'); -$graph->title->Set('Adding labels on the edges'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$example_title = 'Adding labels on the edges'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); // Create one matrix plot -$mp = new MatrixPlot($data, 1); +$mp = new Plot\MatrixPlot($data, 1); $mp->SetModuleSize(13, 15); $mp->SetCenterPos(0.35, 0.45); $mp->colormap->SetNullColor('gray'); @@ -44,13 +44,13 @@ // Setup column lablels $mp->collabel->Set($xlabels); $mp->collabel->SetSide('bottom'); -$mp->collabel->SetFont(FF_ARIAL, FS_NORMAL, 8); +$mp->collabel->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $mp->collabel->SetFontColor('darkgray'); // Setup row lablels $mp->rowlabel->Set($ylabels); $mp->rowlabel->SetSide('right'); -$mp->rowlabel->SetFont(FF_ARIAL, FS_NORMAL, 8); +$mp->rowlabel->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $mp->rowlabel->SetFontColor('darkgray'); // Move the legend more to the right diff --git a/Examples/examples_matrix/no_test_matrix_edgeex02.php b/Examples/examples_matrix/no_test_matrix_edgeex02.php old mode 100755 new mode 100644 index 9775aebb..6054b266 --- a/Examples/examples_matrix/no_test_matrix_edgeex02.php +++ b/Examples/examples_matrix/no_test_matrix_edgeex02.php @@ -1,7 +1,7 @@ title->Set('Add ine row/col labels'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$width = 350; +$height = 300; +$graph = new MatrixGraph($width, $height); +$example_title = 'Add ine row/col labels'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $mp = new MatrixPlot($data, 1); $mp->SetSize(0.55); @@ -43,12 +44,12 @@ } $mp->rowlabel->Set($rowtitles); -$mp->rowlabel->SetFont(FF_ARIAL, FS_NORMAL, 10); +$mp->rowlabel->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $mp->rowlabel->SetFontColor('blue'); $mp->rowlabel->SetSide('left'); $mp->collabel->Set($coltitles); -$mp->collabel->SetFont(FF_ARIAL, FS_NORMAL, 10); +$mp->collabel->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $mp->collabel->SetFontColor('darkred'); $mp->collabel->SetAngle(70); // 90 is default for col titles $mp->collabel->SetSide('bottom'); diff --git a/Examples/examples_matrix/no_test_matrix_ex0.php b/Examples/examples_matrix/no_test_matrix_ex0.php old mode 100755 new mode 100644 index f9e2b069..16794fe8 --- a/Examples/examples_matrix/no_test_matrix_ex0.php +++ b/Examples/examples_matrix/no_test_matrix_ex0.php @@ -1,7 +1,7 @@ title->Set('Basic matrix example'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$__width = 400; +$__height = 300; +$graph = new MatrixGraph($__width, $__height); +$example_title = 'Basic matrix example'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); // Create a ,atrix plot using all default values $mp = new MatrixPlot($data); diff --git a/Examples/examples_matrix/no_test_matrix_ex01.php b/Examples/examples_matrix/no_test_matrix_ex01.php old mode 100755 new mode 100644 index a4a2556c..47f438b2 --- a/Examples/examples_matrix/no_test_matrix_ex01.php +++ b/Examples/examples_matrix/no_test_matrix_ex01.php @@ -1,7 +1,7 @@ title->Set('Possible legend positions'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$__width = 550; +$__height = 500; +$graph = new MatrixGraph($__width, $__height); +$example_title = 'Possible legend positions'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $mp = []; $n = 4; diff --git a/Examples/examples_matrix/no_test_matrix_ex02.php b/Examples/examples_matrix/no_test_matrix_ex02.php old mode 100755 new mode 100644 index df4320ec..d9edfb5e --- a/Examples/examples_matrix/no_test_matrix_ex02.php +++ b/Examples/examples_matrix/no_test_matrix_ex02.php @@ -1,7 +1,7 @@ title->Set('Meshinterpolation=3'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$__width = 250; +$__height = 220; +$graph = new MatrixGraph($__width, $__height); +$example_title = 'Meshinterpolation=3'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $mp = new MatrixPlot($data, 1); $mp->colormap->SetMap(0); diff --git a/Examples/examples_matrix/no_test_matrix_ex03.php b/Examples/examples_matrix/no_test_matrix_ex03.php old mode 100755 new mode 100644 index cb77574a..76b843ad --- a/Examples/examples_matrix/no_test_matrix_ex03.php +++ b/Examples/examples_matrix/no_test_matrix_ex03.php @@ -1,7 +1,7 @@ title->Set('Adding an icon to the background'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$width = 400; +$height = 400; +$graph = new MatrixGraph($width, $height); +$example_title = 'Adding an icon to the background'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $mp = new MatrixPlot($data, 1); $mp->SetSize(0.6); diff --git a/Examples/examples_matrix/no_test_matrix_ex04.1.php b/Examples/examples_matrix/no_test_matrix_ex04.1.php old mode 100755 new mode 100644 index eac4ac72..d1e5dc37 --- a/Examples/examples_matrix/no_test_matrix_ex04.1.php +++ b/Examples/examples_matrix/no_test_matrix_ex04.1.php @@ -1,7 +1,7 @@ title->Set('Adding a background image'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); -$graph->subtitle->Set('Alphablending = 0.2'); +$width = 300; +$height = 300; +$graph = new MatrixGraph($width, $height); +$example_title = 'Adding a background image'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); +$subtitle_text = 'Alphablending = 0.2'; +$graph->subtitle->Set($subtitle_text); // Add a stretched background image -$graph->SetBackgroundImage(__DIR__ . '/../assets/ironrod.jpg', BGIMG_FILLFRAME); +$graph->SetBackgroundImage(__DIR__ . '/../assets/ironrod.jpg', Graph\Configs::getConfig('BGIMG_FILLFRAME')); $graph->SetBackgroundImageMix(50); $mp = new MatrixPlot($data, 1); diff --git a/Examples/examples_matrix/no_test_matrix_ex04.2.php b/Examples/examples_matrix/no_test_matrix_ex04.2.php old mode 100755 new mode 100644 index 90d89676..ee998f65 --- a/Examples/examples_matrix/no_test_matrix_ex04.2.php +++ b/Examples/examples_matrix/no_test_matrix_ex04.2.php @@ -1,7 +1,7 @@ title->Set('Adding a background image'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); -$graph->subtitle->Set('Alphablending = 0.7'); +$width = 300; +$height = 300; +$graph = new MatrixGraph($width, $height); +$example_title = 'Adding a background image'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); +$subtitle_text = 'Alphablending = 0.7'; +$graph->subtitle->Set($subtitle_text); // Add a stretched background image -$graph->SetBackgroundImage(__DIR__ . '/../assets/ironrod.jpg', BGIMG_FILLFRAME); +$graph->SetBackgroundImage(__DIR__ . '/../assets/ironrod.jpg', Graph\Configs::getConfig('BGIMG_FILLFRAME')); $graph->SetBackgroundImageMix(50); $mp = new MatrixPlot($data, 1); diff --git a/Examples/examples_matrix/no_test_matrix_ex04.php b/Examples/examples_matrix/no_test_matrix_ex04.php old mode 100755 new mode 100644 index 14e4bd9f..7d90f180 --- a/Examples/examples_matrix/no_test_matrix_ex04.php +++ b/Examples/examples_matrix/no_test_matrix_ex04.php @@ -1,7 +1,7 @@ title->Set('Adding a background image'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$width = 400; +$height = 400; +$graph = new MatrixGraph($width, $height); +$example_title = 'Adding a background image'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); // Add a stretched background image -$graph->SetBackgroundImage(__DIR__ . '/../assets/ironrod.jpg', BGIMG_FILLFRAME); +$graph->SetBackgroundImage(__DIR__ . '/../assets/ironrod.jpg', Graph\Configs::getConfig('BGIMG_FILLFRAME')); $graph->SetBackgroundImageMix(50); $mp = new MatrixPlot($data, 1); diff --git a/Examples/examples_matrix/no_test_matrix_ex05.php b/Examples/examples_matrix/no_test_matrix_ex05.php old mode 100755 new mode 100644 index b4252721..b15ea3b8 --- a/Examples/examples_matrix/no_test_matrix_ex05.php +++ b/Examples/examples_matrix/no_test_matrix_ex05.php @@ -1,7 +1,7 @@ title->Set('Using a circular module type'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$width = 400; +$height = 350; +$graph = new MatrixGraph($width, $height); +$example_title = 'Using a circular module type'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $mp = new MatrixPlot($data, 2); $mp->SetSize(0.85); diff --git a/Examples/examples_matrix/no_test_matrix_ex06.php b/Examples/examples_matrix/no_test_matrix_ex06.php old mode 100755 new mode 100644 index d4aa1750..7c72c427 --- a/Examples/examples_matrix/no_test_matrix_ex06.php +++ b/Examples/examples_matrix/no_test_matrix_ex06.php @@ -1,7 +1,7 @@ SetBackgroundGradient('lightsteelblue:0.8', 'lightsteelblue:0.3'); -$graph->title->Set('Matrix with lines'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 18); +$example_title = 'Matrix with lines'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 18); $graph->title->SetColor('white'); // Create two lines to add as markers -$l1 = new Plot\PlotLine(VERTICAL, 5, 'lightgray:1.5', 4); -$l2 = new Plot\PlotLine(HORIZONTAL, 3, 'lightgray:1.5', 4); +$l1 = new Plot\PlotLine(Graph\Configs::getConfig('VERTICAL'), 5, 'lightgray:1.5', 4); +$l2 = new Plot\PlotLine(Graph\Configs::getConfig('HORIZONTAL'), 3, 'lightgray:1.5', 4); // Create one matrix plot $mp = new MatrixPlot($data, 1); @@ -60,19 +61,19 @@ // Setup column lablels $mp->collabel->Set($collabels); $mp->collabel->SetSide('top'); -$mp->collabel->SetFont(FF_ARIAL, FS_NORMAL, 8); +$mp->collabel->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $mp->collabel->SetFontColor('lightgray'); // Setup row lablels $mp->rowlabel->Set($rowlabels); $mp->rowlabel->SetSide('right'); -$mp->rowlabel->SetFont(FF_ARIAL, FS_NORMAL, 8); +$mp->rowlabel->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $mp->rowlabel->SetFontColor('lightgray'); // Move the legend more to the right $mp->legend->SetMargin(90); $mp->legend->SetColor('white'); -$mp->legend->SetFont(FF_VERDANA, FS_BOLD, 10); +$mp->legend->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->Add($mp); $graph->Stroke(); diff --git a/Examples/examples_matrix/no_test_matrix_introex.php b/Examples/examples_matrix/no_test_matrix_introex.php old mode 100755 new mode 100644 index af2cfbd0..d1022ccc --- a/Examples/examples_matrix/no_test_matrix_introex.php +++ b/Examples/examples_matrix/no_test_matrix_introex.php @@ -1,7 +1,7 @@ SetMargin(1, 2, 70, 1); $graph->SetColor('white'); $graph->SetMarginColor('#fafafa'); -$graph->title->Set('Intro matrix graph'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$example_title = 'Intro matrix graph'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); // Setup the background image -$graph->SetBackgroundImage(__DIR__ . '/../assets/fireplace.jpg', BGIMG_FILLPLOT); +$graph->SetBackgroundImage(__DIR__ . '/../assets/fireplace.jpg', Graph\Configs::getConfig('BGIMG_FILLPLOT')); $graph->SetBackgroundImageMix(50); // Setup the timer in the right footer @@ -82,7 +83,7 @@ $t = []; for ($i = 0; $i < $n; ++$i) { $t[$i] = new Text($txts[$i][0], $txts[$i][1], $txts[$i][2]); - $t[$i]->SetFont(FF_ARIAL, FS_BOLD, 14); + $t[$i]->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $t[$i]->SetColor('white'); $t[$i]->SetAlign('center', 'top'); } diff --git a/Examples/examples_matrix/no_test_matrix_layout_ex1.php b/Examples/examples_matrix/no_test_matrix_layout_ex1.php old mode 100755 new mode 100644 index b08d8b45..685f4f45 --- a/Examples/examples_matrix/no_test_matrix_layout_ex1.php +++ b/Examples/examples_matrix/no_test_matrix_layout_ex1.php @@ -1,7 +1,7 @@ title->Set('Matrix layout example'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$__width = 850; +$__height = 580; +$graph = new MatrixGraph($__width, $__height); +$example_title = 'Matrix layout example'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $mp = []; $n = 5; diff --git a/Examples/examples_matrix/no_test_matrixex00.php b/Examples/examples_matrix/no_test_matrixex00.php old mode 100755 new mode 100644 index 752a6295..571587d7 --- a/Examples/examples_matrix/no_test_matrixex00.php +++ b/Examples/examples_matrix/no_test_matrixex00.php @@ -1,7 +1,7 @@ title->Set('Matrix example 00'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$__width = 850; +$__height = 580; +$graph = new MatrixGraph($__width, $__height); +$example_title = 'Matrix example 00'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); //$graph->SetColor('darkgreen@0.8'); diff --git a/Examples/examples_multigraph/example_two_piecharts.php b/Examples/examples_multigraph/example_four_piecharts.php old mode 100755 new mode 100644 similarity index 87% rename from Examples/examples_multigraph/example_two_piecharts.php rename to Examples/examples_multigraph/example_four_piecharts.php index 6f955951..9a27933c --- a/Examples/examples_multigraph/example_two_piecharts.php +++ b/Examples/examples_multigraph/example_four_piecharts.php @@ -1,7 +1,7 @@ title->set($example_title); $graph->title->SetFont( - FF_ARIAL, - FS_NORMAL, + Graph\Configs::FF_ARIAL, + Graph\Configs::FS_NORMAL, 14 ); $p1 = new Plot\PiePlot($data); @@ -36,8 +36,8 @@ '/usr/share/fonts/truetype/ubuntu/Ubuntu-I.ttf' ); $graph2->title->SetFont( - FF_USERFONT1, - FS_NORMAL, + Graph\Configs::FF_USERFONT1, + Graph\Configs::FS_NORMAL, 14 ); @@ -48,7 +48,7 @@ $graph3 = new Graph\PieGraph($__width, $__height); $graph3->SetShadow(); -$example_title3 = 'Using Lato Italic'; +$example_title3 = 'Using Lato'; $graph3->title->set($example_title3); $graph3->SetUserFont2( '/usr/share/fonts/truetype/lato/Lato-Regular.ttf', @@ -57,8 +57,8 @@ '/usr/share/fonts/truetype/lato/Lato-BoldItalic.ttf' ); $graph3->title->SetFont( - FF_USERFONT2, - FS_ITALIC, + Graph\Configs::FF_USERFONT2, + Graph\Configs::FS_ITALIC, 14 ); @@ -76,8 +76,8 @@ '/usr/share/fonts/truetype/crosextra/Carlito-BoldItalic.ttf' ); $graph4->title->SetFont( - FF_USERFONT3, - FS_BOLDITALIC, + Graph\Configs::FF_USERFONT3, + Graph\Configs::FS_BOLDITALIC, 14 ); diff --git a/Examples/examples_multigraph/example_two_graphs_chinese.php b/Examples/examples_multigraph/example_two_graphs_chinese.php index 17fcec01..12523112 100644 --- a/Examples/examples_multigraph/example_two_graphs_chinese.php +++ b/Examples/examples_multigraph/example_two_graphs_chinese.php @@ -7,6 +7,7 @@ require_once __DIR__ . '/../../src/config.inc.php'; use Amenadiel\JpGraph\Graph; use Amenadiel\JpGraph\Plot; +use Amenadiel\JpGraph\Text; $data = [40, 60, 21, 33]; @@ -23,8 +24,8 @@ $graph->SetUserFont1($SIMSUN_PATH); $graph->title->SetFont( - FF_USERFONT1, //FF_SIMSUN, - FS_NORMAL, + Text\Configs::FF_USERFONT1, //FF_SIMSUN, + Text\Configs::FS_NORMAL, 14 ); @@ -38,7 +39,7 @@ $graph->Add($bar1); /** - * Add second graph, pie plot + * Add second graph, pie plot. * * @var array */ @@ -50,21 +51,16 @@ $graph2->title->set($example_title2); $graph2->title->SetFont( - FF_CHINESE, - FS_NORMAL, + Text\Configs::FF_CHINESE, + Text\Configs::FS_NORMAL, 14 ); $p2 = new Plot\PiePlot($data2); $graph2->Add($p2); -$mgraph = new Graph\MGraph(); -$mgraph->SetMargin(2, 2, 2, 2); -$mgraph->SetFrame(true, 'darkgray', 2); -$mgraph->SetFillColor('lightgray'); - /** - * Adds a third graph (Impulse plot, scatter) + * Adds a third graph (Impulse plot, scatter). * * @var Graph */ @@ -79,13 +75,13 @@ $graph3->title->set($example_title3); $graph3->title->SetFont( - FF_SIMSUN, //FF_SIMSUN, - FS_NORMAL, + Text\Configs::FF_SIMSUN, //FF_SIMSUN, + Text\Configs::FS_NORMAL, 14 ); $sp1 = new Plot\ScatterPlot($datay); -$sp1->mark->SetType(MARK_SQUARE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $sp1->SetImpuls(); $graph3->Add($sp1); @@ -93,9 +89,12 @@ //----------------------- // Create a multigraph //---------------------- - +$mgraph = new Graph\MGraph(); +$mgraph->SetMargin(2, 2, 2, 2); +$mgraph->SetFrame(true, 'darkgray', 2); +$mgraph->SetFillColor('lightgray'); $mgraph->Add($graph); $mgraph->Add($graph2, 300, 0); -// $mgraph->Add($graph3, 0, 250); +$mgraph->Add($graph3, 0, 250); $mgraph->Stroke(); diff --git a/Examples/examples_multigraph/no_test_comb90dategraphex01.php b/Examples/examples_multigraph/no_test_comb90dategraphex01.php old mode 100755 new mode 100644 index fae25b1d..b1ddba1c --- a/Examples/examples_multigraph/no_test_comb90dategraphex01.php +++ b/Examples/examples_multigraph/no_test_comb90dategraphex01.php @@ -1,7 +1,7 @@ title->Set('Odometer title'); +//---------------------------------------------------------------------$example_title='Odometer title'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('2002-02-13'); +$subtitle_text = '2002-02-13'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- diff --git a/Examples/examples_odometer/no_test_odoex010.php b/Examples/examples_odometer/no_test_odoex010.php old mode 100755 new mode 100644 index e64085e3..d7b022ff --- a/Examples/examples_odometer/no_test_odoex010.php +++ b/Examples/examples_odometer/no_test_odoex010.php @@ -1,10 +1,10 @@ scale->label->SetColor('blue'); $odo3->scale->label->SetColor('darkred'); -$odo1->scale->label->SetFont(FF_FONT1); -$odo2->scale->label->SetFont(FF_FONT2, FS_BOLD); -$odo3->scale->label->SetFont(FF_ARIAL, FS_BOLD, 11); +$odo1->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1')); +$odo2->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); +$odo3->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); //--------------------------------------------------------------------- // Add the odometers to the graph using a vertical layout diff --git a/Examples/examples_odometer/no_test_odoex011.php b/Examples/examples_odometer/no_test_odoex011.php old mode 100755 new mode 100644 index 0209cfdf..6d8a1d80 --- a/Examples/examples_odometer/no_test_odoex011.php +++ b/Examples/examples_odometer/no_test_odoex011.php @@ -1,10 +1,10 @@ title->Set('Result from 2002'); +//---------------------------------------------------------------------$example_title='Result from 2002'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('O1 - W-Site'); +$subtitle_text = 'O1 - W-Site'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- @@ -61,11 +61,11 @@ // Set caption for each odometer //--------------------------------------------------------------------- $odo1->caption->Set('April'); -$odo1->caption->SetFont(FF_FONT2, FS_BOLD); +$odo1->caption->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $odo2->caption->Set('May'); -$odo2->caption->SetFont(FF_FONT2, FS_BOLD); +$odo2->caption->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $odo3->caption->Set('June'); -$odo3->caption->SetFont(FF_FONT2, FS_BOLD); +$odo3->caption->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); //--------------------------------------------------------------------- // Set Indicator bands for the odometers @@ -95,9 +95,9 @@ $odo2->scale->label->SetColor('blue'); $odo3->scale->label->SetColor('darkred'); -$odo1->scale->label->SetFont(FF_FONT1); -$odo2->scale->label->SetFont(FF_FONT2, FS_BOLD); -$odo3->scale->label->SetFont(FF_ARIAL, FS_BOLD, 10); +$odo1->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1')); +$odo2->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); +$odo3->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); //--------------------------------------------------------------------- // Add the odometers to the graph using a vertical layout diff --git a/Examples/examples_odometer/no_test_odoex012.php b/Examples/examples_odometer/no_test_odoex012.php old mode 100755 new mode 100644 index 09236e3a..06de21b1 --- a/Examples/examples_odometer/no_test_odoex012.php +++ b/Examples/examples_odometer/no_test_odoex012.php @@ -1,10 +1,10 @@ title->Set('Result from 2002'); +//---------------------------------------------------------------------$example_title='Result from 2002'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('O1 - W-Site'); +$subtitle_text = 'O1 - W-Site'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- @@ -64,15 +64,15 @@ // Set caption for each odometer //--------------------------------------------------------------------- $odo1->caption->Set('April'); -$odo1->caption->SetFont(FF_ARIAL, FS_BOLD); +$odo1->caption->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); $odo2->caption->Set('May'); -$odo2->caption->SetFont(FF_FONT2, FS_BOLD); +$odo2->caption->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $odo3->caption->Set('June'); -$odo3->caption->SetFont(FF_FONT2, FS_BOLD); +$odo3->caption->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $odo4->caption->Set('Daily low average'); -$odo4->caption->SetFont(FF_FONT1, FS_BOLD); +$odo4->caption->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $odo5->caption->Set('Daily high average'); -$odo5->caption->SetFont(FF_FONT1, FS_BOLD); +$odo5->caption->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); //--------------------------------------------------------------------- // Set Indicator bands for the odometers @@ -104,9 +104,9 @@ $odo2->scale->label->SetColor('blue'); $odo3->scale->label->SetColor('darkred'); -$odo1->scale->label->SetFont(FF_FONT1); -$odo2->scale->label->SetFont(FF_FONT2, FS_BOLD); -$odo3->scale->label->SetFont(FF_ARIAL, FS_BOLD, 10); +$odo1->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1')); +$odo2->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); +$odo3->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); //--------------------------------------------------------------------- // Add the odometers to the graph using a vertical layout diff --git a/Examples/examples_odometer/no_test_odoex02.php b/Examples/examples_odometer/no_test_odoex02.php old mode 100755 new mode 100644 index d220c5bd..bf76fe71 --- a/Examples/examples_odometer/no_test_odoex02.php +++ b/Examples/examples_odometer/no_test_odoex02.php @@ -1,10 +1,10 @@ title->Set('Odometer title'); +//---------------------------------------------------------------------$example_title='Odometer title'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('2002-02-13'); +$subtitle_text = '2002-02-13'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- diff --git a/Examples/examples_odometer/no_test_odoex03.php b/Examples/examples_odometer/no_test_odoex03.php old mode 100755 new mode 100644 index cb0fb1f9..d700ea73 --- a/Examples/examples_odometer/no_test_odoex03.php +++ b/Examples/examples_odometer/no_test_odoex03.php @@ -1,10 +1,10 @@ title->Set('Odometer title'); +//---------------------------------------------------------------------$example_title='Odometer title'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('2002-02-13'); +$subtitle_text = '2002-02-13'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- @@ -70,7 +70,7 @@ //--------------------------------------------------------------------- // Use a bold font for tick labels //--------------------------------------------------------------------- -$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); //--------------------------------------------------------------------- // Set display value for the odometer diff --git a/Examples/examples_odometer/no_test_odoex04.php b/Examples/examples_odometer/no_test_odoex04.php old mode 100755 new mode 100644 index e801f943..5da41bb9 --- a/Examples/examples_odometer/no_test_odoex04.php +++ b/Examples/examples_odometer/no_test_odoex04.php @@ -1,10 +1,10 @@ title->Set('Odometer title'); +//---------------------------------------------------------------------$example_title='Odometer title'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('2002-02-13'); +$subtitle_text = '2002-02-13'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- @@ -75,7 +75,7 @@ //--------------------------------------------------------------------- // Use a bold font for tick labels //--------------------------------------------------------------------- -$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); //--------------------------------------------------------------------- // Set display value for the odometer @@ -85,7 +85,7 @@ //--------------------------------------------------------------------- // Set a new style for the needle //--------------------------------------------------------------------- -$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_MEDIUM_TRIANGLE')); $odo->needle->SetLength(0.7); // Length as 70% of the radius $odo->needle->SetFillColor('orange'); diff --git a/Examples/examples_odometer/no_test_odoex05.php b/Examples/examples_odometer/no_test_odoex05.php old mode 100755 new mode 100644 index a91aff09..66bde688 --- a/Examples/examples_odometer/no_test_odoex05.php +++ b/Examples/examples_odometer/no_test_odoex05.php @@ -1,10 +1,10 @@ title->Set('Odometer title'); +//---------------------------------------------------------------------$example_title='Odometer title'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('2002-02-13'); +$subtitle_text = '2002-02-13'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- @@ -87,7 +87,7 @@ //--------------------------------------------------------------------- // Use a bold font for tick labels //--------------------------------------------------------------------- -$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); //--------------------------------------------------------------------- // Set display value for the odometer @@ -103,7 +103,7 @@ //--------------------------------------------------------------------- // Set a new style for the needle //--------------------------------------------------------------------- -$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_MEDIUM_TRIANGLE')); $odo->needle->SetLength(0.7); // Length as 70% of the radius $odo->needle->SetFillColor('orange'); @@ -111,7 +111,7 @@ // Setup the second indicator needle //--------------------------------------------------------------------- $odo->needle2->Set(24); -$odo->needle2->SetStyle(NEEDLE_STYLE_SMALL_TRIANGLE); +$odo->needle2->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_SMALL_TRIANGLE')); $odo->needle2->SetLength(0.55); // Length as 70% of the radius $odo->needle2->SetFillColor('lightgray'); $odo->needle2->Show(); diff --git a/Examples/examples_odometer/no_test_odoex06.php b/Examples/examples_odometer/no_test_odoex06.php old mode 100755 new mode 100644 index 9dd7f50b..f3de53ed --- a/Examples/examples_odometer/no_test_odoex06.php +++ b/Examples/examples_odometer/no_test_odoex06.php @@ -1,10 +1,10 @@ title->Set('Odometer title'); +//---------------------------------------------------------------------$example_title='Odometer title'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('2002-02-13'); +$subtitle_text = '2002-02-13'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- @@ -58,7 +58,7 @@ // Now we need to create an odometer to add to the graph. // By default the scale will be 0 to 100 //--------------------------------------------------------------------- -$odo = new Odometer(ODO_FULL); +$odo = new Odometer(Graph\Configs::getConfig('ODO_FULL')); //--------------------------------------------------------------------- // Set color indication @@ -86,7 +86,7 @@ //--------------------------------------------------------------------- // Use a bold font for tick labels //--------------------------------------------------------------------- -$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); //--------------------------------------------------------------------- // Set display value for the odometer @@ -102,7 +102,7 @@ //--------------------------------------------------------------------- // Set a new style for the needle //--------------------------------------------------------------------- -$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_MEDIUM_TRIANGLE')); $odo->needle->SetLength(0.7); // Length as 70% of the radius $odo->needle->SetFillColor('orange'); @@ -110,7 +110,7 @@ // Setup the second indicator needle //--------------------------------------------------------------------- $odo->needle2->Set(24); -$odo->needle2->SetStyle(NEEDLE_STYLE_SMALL_TRIANGLE); +$odo->needle2->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_SMALL_TRIANGLE')); $odo->needle2->SetLength(0.55); // Length as 70% of the radius $odo->needle2->SetFillColor('lightgray'); $odo->needle2->Show(); diff --git a/Examples/examples_odometer/no_test_odoex07.php b/Examples/examples_odometer/no_test_odoex07.php old mode 100755 new mode 100644 index ae77cfbe..4a398b96 --- a/Examples/examples_odometer/no_test_odoex07.php +++ b/Examples/examples_odometer/no_test_odoex07.php @@ -1,10 +1,10 @@ title->Set('Odometer title'); +//---------------------------------------------------------------------$example_title='Odometer title'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('2002-02-13'); +$subtitle_text = '2002-02-13'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- @@ -57,7 +57,7 @@ // Now we need to create an odometer to add to the graph. // By default the scale will be 0 to 100 //--------------------------------------------------------------------- -$odo = new Odometer(ODO_FULL); +$odo = new Odometer(Graph\Configs::getConfig('ODO_FULL')); //--------------------------------------------------------------------- // Set color indication @@ -85,7 +85,7 @@ //--------------------------------------------------------------------- // Use a bold font for tick labels //--------------------------------------------------------------------- -$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); //--------------------------------------------------------------------- // Change the start and end angle for the scale @@ -106,7 +106,7 @@ //--------------------------------------------------------------------- // Set a new style for the needle //--------------------------------------------------------------------- -$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_MEDIUM_TRIANGLE')); $odo->needle->SetLength(0.7); // Length as 70% of the radius $odo->needle->SetFillColor('orange'); @@ -114,7 +114,7 @@ // Setup the second indicator needle //--------------------------------------------------------------------- $odo->needle2->Set(15); -$odo->needle2->SetStyle(NEEDLE_STYLE_SMALL_TRIANGLE); +$odo->needle2->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_SMALL_TRIANGLE')); $odo->needle2->SetLength(0.55); // Length as 70% of the radius $odo->needle2->SetFillColor('lightgray'); $odo->needle2->Show(); diff --git a/Examples/examples_odometer/no_test_odoex08.php b/Examples/examples_odometer/no_test_odoex08.php old mode 100755 new mode 100644 index bc5471fc..9207c609 --- a/Examples/examples_odometer/no_test_odoex08.php +++ b/Examples/examples_odometer/no_test_odoex08.php @@ -1,10 +1,10 @@ title->Set('Odometer title'); +//---------------------------------------------------------------------$example_title='Odometer title'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->subtitle->Set('2002-02-13'); +$subtitle_text = '2002-02-13'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); //--------------------------------------------------------------------- @@ -69,7 +69,7 @@ // Now we need to create an odometer to add to the graph. // By default the scale will be 0 to 100 //--------------------------------------------------------------------- -$odo = new Odometer(ODO_FULL); +$odo = new Odometer(Graph\Configs::getConfig('ODO_FULL')); //--------------------------------------------------------------------- // Set fill color for odometer @@ -102,7 +102,7 @@ //--------------------------------------------------------------------- // Use a bold font for tick labels //--------------------------------------------------------------------- -$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); //--------------------------------------------------------------------- // Change the start and end angle for the scale @@ -123,7 +123,7 @@ //--------------------------------------------------------------------- // Set a new style for the needle //--------------------------------------------------------------------- -$odo->needle->SetStyle(NEEDLE_STYLE_MEDIUM_TRIANGLE); +$odo->needle->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_MEDIUM_TRIANGLE')); $odo->needle->SetLength(0.7); // Length as 70% of the radius $odo->needle->SetFillColor('orange'); @@ -131,7 +131,7 @@ // Setup the second indicator needle //--------------------------------------------------------------------- $odo->needle2->Set(15); -$odo->needle2->SetStyle(NEEDLE_STYLE_SMALL_TRIANGLE); +$odo->needle2->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_SMALL_TRIANGLE')); $odo->needle2->SetLength(0.55); // Length as 70% of the radius $odo->needle2->SetFillColor('lightgray'); diff --git a/Examples/examples_odometer/no_test_odoex09.php b/Examples/examples_odometer/no_test_odoex09.php old mode 100755 new mode 100644 index 390d44d1..dcc3a19d --- a/Examples/examples_odometer/no_test_odoex09.php +++ b/Examples/examples_odometer/no_test_odoex09.php @@ -1,10 +1,10 @@ needle->Set(30); diff --git a/Examples/examples_odometer/no_test_odotutex02.php b/Examples/examples_odometer/no_test_odotutex02.php old mode 100755 new mode 100644 index ff630f23..2aa76024 --- a/Examples/examples_odometer/no_test_odotutex02.php +++ b/Examples/examples_odometer/no_test_odotutex02.php @@ -1,7 +1,7 @@ title->Set('Result for 2002'); +// Setup titles$example_title='Result for 2002'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); -$graph->subtitle->Set('New York Office'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); +$subtitle_text = 'New York Office'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); $graph->caption->Set('Figure 1. Branch results.'); $graph->caption->SetColor('white'); diff --git a/Examples/examples_odometer/no_test_odotutex03.php b/Examples/examples_odometer/no_test_odotutex03.php old mode 100755 new mode 100644 index 35dbe2b5..5856184f --- a/Examples/examples_odometer/no_test_odotutex03.php +++ b/Examples/examples_odometer/no_test_odotutex03.php @@ -1,7 +1,7 @@ title->Set('Result for 2002'); +// Setup titles$example_title='Result for 2002'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); -$graph->subtitle->Set('New York Office'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); +$subtitle_text = 'New York Office'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); $graph->caption->Set("Figure 1.This is a very, very\nlong text with multiples lines\nthat are added as a caption."); $graph->caption->SetColor('white'); diff --git a/Examples/examples_odometer/no_test_odotutex04.php b/Examples/examples_odometer/no_test_odotutex04.php old mode 100755 new mode 100644 index c503a7c9..bf7ea762 --- a/Examples/examples_odometer/no_test_odotutex04.php +++ b/Examples/examples_odometer/no_test_odotutex04.php @@ -1,7 +1,7 @@ title->Set('Result for 2002'); +// Setup titles$example_title='Result for 2002'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); -$graph->subtitle->Set('New York Office'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); +$subtitle_text = 'New York Office'; +$graph->subtitle->Set($subtitle_text); $graph->subtitle->SetColor('white'); $graph->caption->Set("Figure 1.This is a very, very\nlong text with multiples lines\nthat are added as a caption."); $graph->caption->SetColor('white'); diff --git a/Examples/examples_odometer/no_test_odotutex06.php b/Examples/examples_odometer/no_test_odotutex06.php old mode 100755 new mode 100644 index 22fc5288..7af17ea9 --- a/Examples/examples_odometer/no_test_odotutex06.php +++ b/Examples/examples_odometer/no_test_odotutex06.php @@ -1,7 +1,7 @@ needle->Set(80); $odo[$i]->needle->SetStyle($nstyle[$i]); $odo[$i]->caption->Set($captions[$i]); - $odo[$i]->caption->SetFont(FF_FONT1); + $odo[$i]->caption->SetFont(Graph\Configs::getConfig('FF_FONT1')); $odo[$i]->caption->SetMargin(3); } diff --git a/Examples/examples_odometer/no_test_odotutex07.php b/Examples/examples_odometer/no_test_odotutex07.php old mode 100755 new mode 100644 index b7acd247..f268c4a7 --- a/Examples/examples_odometer/no_test_odotutex07.php +++ b/Examples/examples_odometer/no_test_odotutex07.php @@ -1,7 +1,7 @@ SetColor('lightyellow'); $odo[$i]->needle->Set(75); - $odo[$i]->needle->SetStyle(NEEDLE_STYLE_ENDARROW, $astyles[$i]); - $odo[$i]->caption->SetFont(FF_FONT1, FS_BOLD); + $odo[$i]->needle->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_ENDARROW'), $astyles[$i]); + $odo[$i]->caption->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $odo[$i]->caption->Set('Arrow: ' . $acaptions[$i]); } diff --git a/Examples/examples_odometer/no_test_odotutex08.1.php b/Examples/examples_odometer/no_test_odotutex08.1.php old mode 100755 new mode 100644 index d8aeb389..18d2de34 --- a/Examples/examples_odometer/no_test_odotutex08.1.php +++ b/Examples/examples_odometer/no_test_odotutex08.1.php @@ -1,7 +1,7 @@ title->Set('An example with thick border'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$example_title = 'An example with thick border'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); // Add drop shadow for graph $graph->SetShadow(); @@ -32,7 +33,7 @@ $odo->SetColor('white'); $odo->SetBorder('darkgreen:0.8', 5); -$odo->scale->label->SetFont(FF_ARIAL, FS_BOLD, 10); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $odo->scale->label->SetColor('brown:0.6'); // Set display value for the odometer diff --git a/Examples/examples_odometer/no_test_odotutex08.php b/Examples/examples_odometer/no_test_odotutex08.php old mode 100755 new mode 100644 index 74c1ad8b..51a6bfa3 --- a/Examples/examples_odometer/no_test_odotutex08.php +++ b/Examples/examples_odometer/no_test_odotutex08.php @@ -1,7 +1,7 @@ title->Set('An example with drop shadows'); +$example_title = 'An example with drop shadows'; +$graph->title->set($example_title); // Add drop shadow for graph $graph->SetShadow(); diff --git a/Examples/examples_odometer/no_test_odotutex09.php b/Examples/examples_odometer/no_test_odotutex09.php old mode 100755 new mode 100644 index 90519cd2..078ee170 --- a/Examples/examples_odometer/no_test_odotutex09.php +++ b/Examples/examples_odometer/no_test_odotutex09.php @@ -1,7 +1,7 @@ SetColor('lightyellow'); $odo[$i]->needle->Set(75); - $odo[$i]->needle->SetStyle(NEEDLE_STYLE_ENDARROW, $astyles[$i]); - $odo[$i]->caption->SetFont(FF_FONT1); + $odo[$i]->needle->SetStyle(Graph\Configs::getConfig('NEEDLE_STYLE_ENDARROW'), $astyles[$i]); + $odo[$i]->caption->SetFont(Graph\Configs::getConfig('FF_FONT1')); $odo[$i]->caption->Set($acaptions[$i]); $odo[$i]->SetMargin(15); } diff --git a/Examples/examples_odometer/no_test_odotutex10.php b/Examples/examples_odometer/no_test_odotutex10.php old mode 100755 new mode 100644 index b757bd7a..8567eff2 --- a/Examples/examples_odometer/no_test_odotutex10.php +++ b/Examples/examples_odometer/no_test_odotutex10.php @@ -1,7 +1,7 @@ title->Set('Example with scale indicators'); +$__width = 250; +$__height = 150; +$graph = new OdoGraph($__width, $__height); +$example_title = 'Example with scale indicators'; +$graph->title->set($example_title); // Add drop shadow for graph $graph->SetShadow(); // Now we need to create an odometer to add to the graph. // By default the scale will be 0 to 100 -$odo = new Odometer(ODO_HALF); +$odo = new Odometer(Graph\Configs::getConfig('ODO_HALF')); // Add color indications $odo->AddIndication(0, 20, 'green:0.7'); diff --git a/Examples/examples_odometer/no_test_odotutex11.php b/Examples/examples_odometer/no_test_odotutex11.php old mode 100755 new mode 100644 index b9985961..9f73457f --- a/Examples/examples_odometer/no_test_odotutex11.php +++ b/Examples/examples_odometer/no_test_odotutex11.php @@ -1,7 +1,7 @@ title->Set('Example with scale indicators'); +$__width = 250; +$__height = 150; +$graph = new OdoGraph($__width, $__height); +$example_title = 'Example with scale indicators'; +$graph->title->set($example_title); // Add drop shadow for graph $graph->SetShadow(); // Now we need to create an odometer to add to the graph. // By default the scale will be 0 to 100 -$odo = new Odometer(ODO_HALF); +$odo = new Odometer(Graph\Configs::getConfig('ODO_HALF')); // Add color indications $odo->AddIndication(0, 20, 'green:0.7'); diff --git a/Examples/examples_odometer/no_test_odotutex12.php b/Examples/examples_odometer/no_test_odotutex12.php old mode 100755 new mode 100644 index 0dc57719..61bf54fd --- a/Examples/examples_odometer/no_test_odotutex12.php +++ b/Examples/examples_odometer/no_test_odotutex12.php @@ -1,7 +1,7 @@ title->Set('Example with scale indicators'); +$__width = 250; +$__height = 150; +$graph = new OdoGraph($__width, $__height); +$example_title = 'Example with scale indicators'; +$graph->title->set($example_title); // Add drop shadow for graph $graph->SetShadow(); // Now we need to create an odometer to add to the graph. // By default the scale will be 0 to 100 -$odo = new Odometer(ODO_HALF); +$odo = new Odometer(Graph\Configs::getConfig('ODO_HALF')); // Add color indications $odo->AddIndication(0, 20, 'green:0.7'); diff --git a/Examples/examples_odometer/no_test_odotutex13.php b/Examples/examples_odometer/no_test_odotutex13.php old mode 100755 new mode 100644 index 5fea0058..81eb2650 --- a/Examples/examples_odometer/no_test_odotutex13.php +++ b/Examples/examples_odometer/no_test_odotutex13.php @@ -1,7 +1,7 @@ title->Set('Example with scale indicators'); +$__width = 250; +$__height = 150; +$graph = new OdoGraph($__width, $__height); +$example_title = 'Example with scale indicators'; +$graph->title->set($example_title); // Add drop shadow for graph $graph->SetShadow(); // Now we need to create an odometer to add to the graph. // By default the scale will be 0 to 100 -$odo = new Odometer(ODO_HALF); +$odo = new Odometer(Graph\Configs::getConfig('ODO_HALF')); // Add color indications $odo->AddIndication(0, 20, 'green:0.7'); @@ -37,7 +37,7 @@ // Add scale labels $odo->label->Set('mBar'); -$odo->label->SetFont(FF_FONT2, FS_BOLD); +$odo->label->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); // Add drop shadow for needle $odo->needle->SetShadow(); diff --git a/Examples/examples_odometer/no_test_odotutex14.php b/Examples/examples_odometer/no_test_odotutex14.php old mode 100755 new mode 100644 index 2254d1f9..6a4041a4 --- a/Examples/examples_odometer/no_test_odotutex14.php +++ b/Examples/examples_odometer/no_test_odotutex14.php @@ -1,7 +1,7 @@ title->Set('Custom scale'); +$__width = 250; +$__height = 160; +$graph = new OdoGraph($__width, $__height); +$example_title = 'Custom scale'; +$graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); // Add drop shadow for graph $graph->SetShadow(); diff --git a/Examples/examples_odometer/no_test_odotutex15.php b/Examples/examples_odometer/no_test_odotutex15.php old mode 100755 new mode 100644 index d012b249..a383df95 --- a/Examples/examples_odometer/no_test_odotutex15.php +++ b/Examples/examples_odometer/no_test_odotutex15.php @@ -1,7 +1,7 @@ title->Set('Custom formatting'); +// Setup graph titles$example_title='Custom formatting'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); // Add drop shadow for graph $graph->SetShadow(); @@ -34,9 +33,9 @@ $odo->scale->SetTickWeight(2); $odo->scale->SetLabelPos(0.75); -$odo->scale->label->SetFont(FF_FONT1, FS_BOLD); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $odo->scale->label->SetColor('brown'); -$odo->scale->label->SetFont(FF_ARIAL, FS_NORMAL, 10); +$odo->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); // Setup a label with a degree mark $odo->scale->SetLabelFormat('%dC' . SymChar::Get('degree')); diff --git a/Examples/examples_odometer/no_test_odotutex16.1.php b/Examples/examples_odometer/no_test_odotutex16.1.php old mode 100755 new mode 100644 index 9734d3bb..31d6f8f4 --- a/Examples/examples_odometer/no_test_odotutex16.1.php +++ b/Examples/examples_odometer/no_test_odotutex16.1.php @@ -1,7 +1,7 @@ scale->SetAngle(110, 250); -$odo1->scale->label->SetFont(FF_ARIAL, FS_BOLD, 10); -$odo2->scale->label->SetFont(FF_ARIAL, FS_BOLD, 10); +$odo1->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); +$odo2->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $odo2->AddIndication(-15, 0, 'lightgray'); $odo2->AddIndication(100, 115, 'lightgray'); diff --git a/Examples/examples_odometer/no_test_odotutex16.php b/Examples/examples_odometer/no_test_odotutex16.php old mode 100755 new mode 100644 index 0492e008..11b04f61 --- a/Examples/examples_odometer/no_test_odotutex16.php +++ b/Examples/examples_odometer/no_test_odotutex16.php @@ -1,7 +1,7 @@ scale->SetAngle(110, 250); -$odo1->scale->label->SetFont(FF_ARIAL, FS_BOLD, 10); -$odo2->scale->label->SetFont(FF_ARIAL, FS_BOLD, 10); +$odo1->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); +$odo2->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); // Set display value for the odometer $odo1->needle->Set(70); diff --git a/Examples/examples_odometer/no_test_odotutex17.php b/Examples/examples_odometer/no_test_odotutex17.php old mode 100755 new mode 100644 index e6de6620..891d9d61 --- a/Examples/examples_odometer/no_test_odotutex17.php +++ b/Examples/examples_odometer/no_test_odotutex17.php @@ -1,7 +1,7 @@ title->Set('Manual positioning'); +// Setup graph titles$example_title='Manual positioning'; $graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); // Add drop shadow for graph $graph->SetShadow(); diff --git a/Examples/examples_odometer/no_test_odotutex18.php b/Examples/examples_odometer/no_test_odotutex18.php old mode 100755 new mode 100644 index 6a00fabd..a3f31ed2 --- a/Examples/examples_odometer/no_test_odotutex18.php +++ b/Examples/examples_odometer/no_test_odotutex18.php @@ -1,7 +1,7 @@ scale->label->SetFont(FF_ARIAL, FS_NORMAL, $fsize); + $odo[$i]->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), $fsize); $odo[$i]->AddIndication(92, 100, 'red'); $odo[$i]->AddIndication(80, 92, 'orange'); $odo[$i]->AddIndication(60, 80, 'yellow'); diff --git a/Examples/examples_odometer/no_test_odotutex19.php b/Examples/examples_odometer/no_test_odotutex19.php old mode 100755 new mode 100644 index 896617d5..62a13ff4 --- a/Examples/examples_odometer/no_test_odotutex19.php +++ b/Examples/examples_odometer/no_test_odotutex19.php @@ -1,7 +1,7 @@ scale->label->SetFont(FF_ARIAL, FS_NORMAL, $fsize); + $odo[$i]->scale->label->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), $fsize); $odo[$i]->AddIndication(92, 100, 'red'); $odo[$i]->AddIndication(80, 92, 'orange'); $odo[$i]->AddIndication(60, 80, 'yellow'); @@ -49,7 +49,7 @@ $t = new Text('JpGraph', 250, 70); $t->SetAlign('center', 'top'); -#$t->SetFont(FF_VERA,FS_BOLD,11); +#$t->SetFont(Graph\Configs::getConfig('FF_VERA'),FS_BOLD,11); $t->SetColor('darkgray'); $graph->Add($t); diff --git a/Examples/examples_pdf/no_test_pdf417_ex0.php b/Examples/examples_pdf/no_test_pdf417_ex0.php index 8441befa..a178b8d0 100755 --- a/Examples/examples_pdf/no_test_pdf417_ex0.php +++ b/Examples/examples_pdf/no_test_pdf417_ex0.php @@ -1,7 +1,7 @@ title->Set('A Simple Pie Plot'); +$__width = 350; +$__height = 250; +$graph = new Graph\PieGraph($__width, $__height); +$example_title = 'A Simple Pie Plot'; +$graph->title->set($example_title); $graph->SetBox(true); $data = [40, 21, 17, 14, 23]; diff --git a/Examples/examples_pie/new_pie4.php b/Examples/examples_pie/new_pie4.php old mode 100755 new mode 100644 index eed6a724..36da5be8 --- a/Examples/examples_pie/new_pie4.php +++ b/Examples/examples_pie/new_pie4.php @@ -1,7 +1,7 @@ SetTheme(new $theme_class()); // Setup background -$graph->SetBackgroundImage(__DIR__ . '/../assets/worldmap1.jpg', BGIMG_FILLFRAME); +$graph->SetBackgroundImage(__DIR__ . '/../assets/worldmap1.jpg', Graph\Configs::getConfig('BGIMG_FILLFRAME')); // Setup title -$graph->title->Set('Pie plots with background image'); +$example_title = 'Pie plots with background image'; +$graph->title->set($example_title); $graph->title->SetColor('white'); -$graph->SetTitleBackground('#4169E1', TITLEBKG_STYLE2, TITLEBKG_FRAME_FULL, '#4169E1', 10, 10, true); +$graph->SetTitleBackground('#4169E1', Graph\Configs::getConfig('TITLEBKG_STYLE2'), Graph\Configs::getConfig('TITLEBKG_FRAME_FULL'), '#4169E1', 10, 10, true); $p = []; // Create the plots @@ -51,7 +52,7 @@ // Set the titles for ($i = 0; $i < $n; ++$i) { $p[$i]->title->Set($titles[$i]); - $p[$i]->title->SetFont(FF_ARIAL, FS_NORMAL, 8); + $p[$i]->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); } for ($i = 0; $i < $n; ++$i) { diff --git a/Examples/examples_pie/no_dim_piebkgex1.php b/Examples/examples_pie/no_dim_piebkgex1.php old mode 100755 new mode 100644 index d4be3048..6fad20fe --- a/Examples/examples_pie/no_dim_piebkgex1.php +++ b/Examples/examples_pie/no_dim_piebkgex1.php @@ -1,7 +1,7 @@ SetShadow(false); // Setup background -$graph->SetBackgroundImage(__DIR__ . '/../assets/worldmap1.jpg', BGIMG_FILLPLOT); +$graph->SetBackgroundImage(__DIR__ . '/../assets/worldmap1.jpg', Graph\Configs::getConfig('BGIMG_FILLPLOT')); // Setup title -$graph->title->Set('Pie plots with background image'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 20); +$example_title = 'Pie plots with background image'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 20); $graph->title->SetColor('white'); $p = []; @@ -55,12 +56,12 @@ for ($i = 0; $i < $n; ++$i) { $p[$i]->title->Set($titles[$i]); $p[$i]->title->SetColor('white'); - $p[$i]->title->SetFont(FF_ARIAL, FS_BOLD, 12); + $p[$i]->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); } // Label font and color setup for ($i = 0; $i < $n; ++$i) { - $p[$i]->value->SetFont(FF_ARIAL, FS_BOLD); + $p[$i]->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD')); $p[$i]->value->SetColor('white'); } diff --git a/Examples/examples_pie/no_dim_piecex1.php b/Examples/examples_pie/no_dim_piecex1.php old mode 100755 new mode 100644 index c72dc336..41437222 --- a/Examples/examples_pie/no_dim_piecex1.php +++ b/Examples/examples_pie/no_dim_piecex1.php @@ -1,7 +1,7 @@ title->Set('Pie plot with center circle'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$example_title = 'Pie plot with center circle'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetMargin(8); // Add a little bit more margin from the top // Create the pie plot @@ -30,18 +31,18 @@ $p1->SetSize(0.32); // Label font and color setup -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $p1->value->SetColor('black'); // Setup the title on the center circle $p1->midtitle->Set("Test mid\nRow 1\nRow 2"); -$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 10); +$p1->midtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); // Set color for mid circle $p1->SetMidColor('yellow'); // Use percentage values in the legends values (This is also the default) -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); // Add plot to pie graph $graph->Add($p1); diff --git a/Examples/examples_pie/no_dim_piecex2.php b/Examples/examples_pie/no_dim_piecex2.php old mode 100755 new mode 100644 index cfdc5139..99eb367d --- a/Examples/examples_pie/no_dim_piecex2.php +++ b/Examples/examples_pie/no_dim_piecex2.php @@ -1,7 +1,7 @@ SetShadow(); // Setup title -$graph->title->Set('Plot\\PiePlotC'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 18); +$example_title = 'Plot\\PiePlotC'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 18); $graph->title->SetMargin(8); // Add a little bit more margin from the top // Create the pie plot @@ -36,20 +37,20 @@ $p1->SetSize(0.35); // Label font and color setup -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 12); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $p1->value->SetColor('white'); $p1->value->Show(); // Setup the title on the center circle $p1->midtitle->Set("Test mid\nRow 1\nRow 2"); -$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 14); +$p1->midtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 14); // Set color for mid circle $p1->SetMidColor('yellow'); // Use percentage values in the legends values (This is also the default) -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); // The label array values may have printf() formatting in them. The argument to the // form,at string will be the value of the slice (either the percetage or absolute diff --git a/Examples/examples_pie/no_test_new_pie2.php b/Examples/examples_pie/no_test_new_pie2.php old mode 100755 new mode 100644 index 0684f058..9f5e54b5 --- a/Examples/examples_pie/no_test_new_pie2.php +++ b/Examples/examples_pie/no_test_new_pie2.php @@ -1,7 +1,7 @@ SetTheme($theme_class); // Set A title for the plot -$graph->title->Set('Multiple - Pie plot'); +$example_title = 'Multiple - Pie plot'; +$graph->title->set($example_title); // Create plots $size = 0.13; @@ -31,7 +32,8 @@ $p1->SetSize($size); $p1->SetCenter(0.25, 0.32); $p1->SetSliceColors(['#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3']); -$p1->title->Set('2005'); +$example_title = '2005'; +$p1->title->set($example_title); $p2 = new Plot\PiePlot($data); $graph->Add($p2); @@ -39,7 +41,8 @@ $p2->SetSize($size); $p2->SetCenter(0.65, 0.32); $p2->SetSliceColors(['#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3']); -$p2->title->Set('2006'); +$example_title = '2006'; +$p2->title->set($example_title); $p3 = new Plot\PiePlot($data); $graph->Add($p3); @@ -47,7 +50,8 @@ $p3->SetSize($size); $p3->SetCenter(0.25, 0.75); $p3->SetSliceColors(['#6495ED', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3']); -$p3->title->Set('2007'); +$example_title = '2007'; +$p3->title->set($example_title); $p4 = new Plot\PiePlot($data); $graph->Add($p4); @@ -55,6 +59,7 @@ $p4->SetSize($size); $p4->SetCenter(0.65, 0.75); $p4->SetSliceColors(['#6495ED', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3']); -$p4->title->Set('2008'); +$example_title = '2008'; +$p4->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_pie/no_test_new_pie3.php b/Examples/examples_pie/no_test_new_pie3.php old mode 100755 new mode 100644 index 0f5d00f1..ce85e537 --- a/Examples/examples_pie/no_test_new_pie3.php +++ b/Examples/examples_pie/no_test_new_pie3.php @@ -1,7 +1,7 @@ SetTheme($theme_class); // Set A title for the plot -$graph->title->Set('A Simple 3D Pie Plot'); +$example_title = 'A Simple 3D Pie Plot'; +$graph->title->set($example_title); // Create $p1 = new Plot\PiePlot3D($data); diff --git a/Examples/examples_pie/pie3dex1.php b/Examples/examples_pie/pie3dex1.php old mode 100755 new mode 100644 index f90dfa5e..62e4e7e2 --- a/Examples/examples_pie/pie3dex1.php +++ b/Examples/examples_pie/pie3dex1.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('Example 1 3D Pie plot'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$example_title = '3D Pie plot Example '; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 18); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -28,7 +29,7 @@ $p1->SetTheme('sand'); $p1->SetCenter(0.4); $p1->SetAngle(30); -$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 12); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $p1->SetLegends(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']); $graph->Add($p1); diff --git a/Examples/examples_pie/pie3dex2.php b/Examples/examples_pie/pie3dex2.php old mode 100755 new mode 100644 index b35d22e8..1f2d4db2 --- a/Examples/examples_pie/pie3dex2.php +++ b/Examples/examples_pie/pie3dex2.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('Example 2 3D Pie plot'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$example_title = '3D Pie plot Example '; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 18); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -40,7 +41,7 @@ // As a shortcut you can easily explode one numbered slice with // $p1->ExplodeSlice(3); -$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 10); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $p1->SetLegends(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']); $graph->Add($p1); diff --git a/Examples/examples_pie/pie3dex3.php b/Examples/examples_pie/pie3dex3.php old mode 100755 new mode 100644 index aef03d84..2388e1b2 --- a/Examples/examples_pie/pie3dex3.php +++ b/Examples/examples_pie/pie3dex3.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('Example 3 3D Pie plot'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$example_title = '3D Pie plot Example '; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 18); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -36,7 +37,7 @@ $p1->ExplodeSlice(3); // Setup the slice values -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $p1->value->SetColor('navy'); $p1->SetLegends(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']); diff --git a/Examples/examples_pie/pie3dex4.php b/Examples/examples_pie/pie3dex4.php old mode 100755 new mode 100644 index c72b7a87..274b738d --- a/Examples/examples_pie/pie3dex4.php +++ b/Examples/examples_pie/pie3dex4.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('Example 4 3D Pie plot'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$example_title = '3D Pie plot Example '; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 18); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -39,7 +40,7 @@ $p1->ExplodeSlice(3); // Setup slice values -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $p1->value->SetColor('navy'); $p1->SetLegends(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']); diff --git a/Examples/examples_pie/pie3dex5.php b/Examples/examples_pie/pie3dex5.php old mode 100755 new mode 100644 index 572e86ce..32a5df39 --- a/Examples/examples_pie/pie3dex5.php +++ b/Examples/examples_pie/pie3dex5.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('Example 5 3D Pie plot'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18); +$example_title = '3D Pie plot Example '; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 18); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -36,11 +37,11 @@ $p1->SetStartAngle(45); // Display the slice values -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $p1->value->SetColor('navy'); // Add colored edges to the 3D pie -// NOTE: You can't have exploded slices with edges! +// Graph\Configs::getConfig('NOTE'): You can't have exploded slices with edges! $p1->SetEdge('navy'); $p1->SetLegends(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']); diff --git a/Examples/examples_pie/pieex1.php b/Examples/examples_pie/pieex1.php old mode 100755 new mode 100644 index 8964fdf2..69f1c9b8 --- a/Examples/examples_pie/pieex1.php +++ b/Examples/examples_pie/pieex1.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('Example 1 Pie plot'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$example_title = 'Pie plot Example '; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetColor('brown'); // Create pie plot @@ -27,7 +28,7 @@ //$p1->SetSliceColors(array("red","blue","yellow","green")); $p1->SetTheme('earth'); -$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 10); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); // Set how many pixels each slice should explode $p1->Explode([0, 15, 15, 25, 15]); diff --git a/Examples/examples_pie/pieex2.php b/Examples/examples_pie/pieex2.php old mode 100755 new mode 100644 index a6c43459..c7642376 --- a/Examples/examples_pie/pieex2.php +++ b/Examples/examples_pie/pieex2.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('Example 2 Pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Pie plot Example '; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Create $p1 = new Plot\PiePlot($data); diff --git a/Examples/examples_pie/pieex3.php b/Examples/examples_pie/pieex3.php old mode 100755 new mode 100644 index 9c7307bc..70903a87 --- a/Examples/examples_pie/pieex3.php +++ b/Examples/examples_pie/pieex3.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('Multiple - Pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Multiple - Pie plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Create plots $size = 0.13; @@ -27,26 +28,30 @@ $p1->SetLegends(['Jan', 'Feb', 'Mar', 'Apr', 'May']); $p1->SetSize($size); $p1->SetCenter(0.25, 0.32); -$p1->value->SetFont(FF_FONT0); -$p1->title->Set('2001'); +$p1->value->SetFont(Graph\Configs::getConfig('FF_FONT0')); +$example_title = '2001'; +$p1->title->set($example_title); $p2 = new Plot\PiePlot($data); $p2->SetSize($size); $p2->SetCenter(0.65, 0.32); -$p2->value->SetFont(FF_FONT0); -$p2->title->Set('2002'); +$p2->value->SetFont(Graph\Configs::getConfig('FF_FONT0')); +$example_title = '2002'; +$p2->title->set($example_title); $p3 = new Plot\PiePlot($data); $p3->SetSize($size); $p3->SetCenter(0.25, 0.75); -$p3->value->SetFont(FF_FONT0); -$p3->title->Set('2003'); +$p3->value->SetFont(Graph\Configs::getConfig('FF_FONT0')); +$example_title = '2003'; +$p3->title->set($example_title); $p4 = new Plot\PiePlot($data); $p4->SetSize($size); $p4->SetCenter(0.65, 0.75); -$p4->value->SetFont(FF_FONT0); -$p4->title->Set('2004'); +$p4->value->SetFont(Graph\Configs::getConfig('FF_FONT0')); +$example_title = '2004'; +$p4->title->set($example_title); $graph->Add($p1); $graph->Add($p2); diff --git a/Examples/examples_pie/pieex4.php b/Examples/examples_pie/pieex4.php old mode 100755 new mode 100644 index b7a796f2..b601f8fa --- a/Examples/examples_pie/pieex4.php +++ b/Examples/examples_pie/pieex4.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('Example 4 of pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Example 4 of pie plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1 = new Plot\PiePlot($data); -$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1->value->SetColor('darkred'); $p1->SetSize(0.3); $p1->SetCenter(0.4); diff --git a/Examples/examples_pie/pieex5.php b/Examples/examples_pie/pieex5.php old mode 100755 new mode 100644 index 0093366e..8bf73f0b --- a/Examples/examples_pie/pieex5.php +++ b/Examples/examples_pie/pieex5.php @@ -1,7 +1,7 @@ SetShadow(); // Setup graph title -$graph->title->Set('Example 5 of pie plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Example 5 of pie plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Create pie plot $p1 = new Plot\PiePlot($data); -$p1->value->SetFont(FF_VERDANA, FS_BOLD); +$p1->value->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD')); $p1->value->SetColor('darkred'); $p1->SetSize(0.3); $p1->SetCenter(0.4); diff --git a/Examples/examples_pie/pieex6.php b/Examples/examples_pie/pieex6.php old mode 100755 new mode 100644 index 8b753609..26864976 --- a/Examples/examples_pie/pieex6.php +++ b/Examples/examples_pie/pieex6.php @@ -1,7 +1,7 @@ SetShadow(); // Setup title -$graph->title->Set('Example of pie plot with absolute labels'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Example of pie plot with absolute labels'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // The pie plot $p1 = new Plot\PiePlot($data); @@ -32,11 +33,11 @@ $p1->ShowBorder(false); // Label font and color setup -$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1->value->SetColor('darkred'); // Use absolute values (type==1) -$p1->SetLabelType(PIE_VALUE_ABS); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_ABS')); // Label format $p1->value->SetFormat('$%d'); diff --git a/Examples/examples_pie/pieex7.php b/Examples/examples_pie/pieex7.php old mode 100755 new mode 100644 index 78830e45..f3efd241 --- a/Examples/examples_pie/pieex7.php +++ b/Examples/examples_pie/pieex7.php @@ -1,7 +1,7 @@ SetShadow(); // Setup title -$graph->title->Set('Pie plot with absolute labels'); -$graph->subtitle->Set('(With hidden 0 labels)'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Pie plot with absolute labels'; +$graph->title->set($example_title); +$subtitle_text = '(With hidden 0 labels)'; +$graph->subtitle->Set($subtitle_text); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // The pie plot $p1 = new Plot\PiePlot($data); @@ -34,11 +36,11 @@ $p1->ShowBorder(false); // Label font and color setup -$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1->value->SetColor('darkred'); // Use absolute values (type==1) -$p1->SetLabelType(PIE_VALUE_ABS); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_ABS')); // Label format $p1->value->SetFormat('$%d'); diff --git a/Examples/examples_pie/pieex8.php b/Examples/examples_pie/pieex8.php old mode 100755 new mode 100644 index abd7df42..1f8cb4ea --- a/Examples/examples_pie/pieex8.php +++ b/Examples/examples_pie/pieex8.php @@ -1,7 +1,7 @@ SetShadow(); -// Title setup -$graph->title->Set('Adjusting the label pos'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// Title setup$example_title='Adjusting the label pos'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Setup the pie plot $p1 = new Plot\PiePlot($data); @@ -28,7 +27,7 @@ $p1->SetCenter(0.5, 0.52); // Setup slice labels and move them into the plot -$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1->value->SetColor('darkred'); $p1->SetLabelPos(0.6); diff --git a/Examples/examples_pie/pieex9.php b/Examples/examples_pie/pieex9.php old mode 100755 new mode 100644 index 1f299ff8..eda170a5 --- a/Examples/examples_pie/pieex9.php +++ b/Examples/examples_pie/pieex9.php @@ -1,7 +1,7 @@ SetShadow(); -// Title setup -$graph->title->Set('Exploding all slices'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// Title setup$example_title='Exploding all slices'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Setup the pie plot $p1 = new Plot\PiePlot($data); @@ -28,7 +27,7 @@ $p1->SetCenter(0.5, 0.52); // Setup slice labels and move them into the plot -$p1->value->SetFont(FF_FONT1, FS_BOLD); +$p1->value->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $p1->value->SetColor('darkred'); $p1->SetLabelPos(0.65); diff --git a/Examples/examples_pie/pielabelsex1.php b/Examples/examples_pie/pielabelsex1.php old mode 100755 new mode 100644 index 5d53562e..f5eaaa99 --- a/Examples/examples_pie/pielabelsex1.php +++ b/Examples/examples_pie/pielabelsex1.php @@ -1,7 +1,7 @@ title->Set('Label guide lines'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Label guide lines'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -31,9 +32,9 @@ $p1->SetGuideLinesAdjust(1.4); // Setup the labels -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); $p1->value->Show(); -$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $p1->value->SetFormat('%2.1f%%'); // Add and stroke diff --git a/Examples/examples_pie/pielabelsex2.php b/Examples/examples_pie/pielabelsex2.php old mode 100755 new mode 100644 index c817f46c..275187ce --- a/Examples/examples_pie/pielabelsex2.php +++ b/Examples/examples_pie/pielabelsex2.php @@ -1,7 +1,7 @@ title->Set('Label guide lines'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Label guide lines'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -31,9 +32,9 @@ $p1->SetGuideLinesAdjust(1.5); // Setup the labels -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); $p1->value->Show(); -$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $p1->value->SetFormat('%2.1f%%'); // Add and stroke diff --git a/Examples/examples_pie/pielabelsex3.php b/Examples/examples_pie/pielabelsex3.php old mode 100755 new mode 100644 index fe20adda..b5c650b2 --- a/Examples/examples_pie/pielabelsex3.php +++ b/Examples/examples_pie/pielabelsex3.php @@ -1,7 +1,7 @@ title->Set('Label guide lines'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Label guide lines'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -32,9 +33,9 @@ $p1->SetGuideLinesAdjust(1.5); // Setup the labels -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); $p1->value->Show(); -$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $p1->value->SetFormat('%2.1f%%'); // Add and stroke diff --git a/Examples/examples_pie/pielabelsex4.php b/Examples/examples_pie/pielabelsex4.php old mode 100755 new mode 100644 index 215fe7f4..6233e97f --- a/Examples/examples_pie/pielabelsex4.php +++ b/Examples/examples_pie/pielabelsex4.php @@ -1,7 +1,7 @@ title->Set('Label guide lines'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Label guide lines'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('darkblue'); $graph->legend->Pos(0.1, 0.2); @@ -31,9 +32,9 @@ $p1->SetGuideLinesAdjust(1.1); // Setup the labels -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); $p1->value->Show(); -$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $p1->value->SetFormat('%2.1f%%'); // Add and stroke diff --git a/Examples/examples_pie/pielabelsex5.php b/Examples/examples_pie/pielabelsex5.php old mode 100755 new mode 100644 index dc43e485..142b025e --- a/Examples/examples_pie/pielabelsex5.php +++ b/Examples/examples_pie/pielabelsex5.php @@ -1,7 +1,7 @@ SetShadow(); // Set A title for the plot -$graph->title->Set('String labels with values'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'String labels with values'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('black'); // Create pie plot @@ -42,9 +43,9 @@ // Setup the label formats and what value we want to be shown (The absolute) // or the percentage. -$p1->SetLabelType(PIE_VALUE_PER); +$p1->SetLabelType(Graph\Configs::getConfig('PIE_VALUE_PER')); $p1->value->Show(); -$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 9); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $p1->value->SetColor('darkgray'); // Add and stroke diff --git a/Examples/examples_polar/no_test_polarclockex1.php b/Examples/examples_polar/polarclockex1.php similarity index 62% rename from Examples/examples_polar/no_test_polarclockex1.php rename to Examples/examples_polar/polarclockex1.php index 9966f3fa..349d5a36 100755 --- a/Examples/examples_polar/no_test_polarclockex1.php +++ b/Examples/examples_polar/polarclockex1.php @@ -1,12 +1,13 @@ SetScale('lin', 150); $graph->SetMarginColor('#FFE6C0'); -$graph->SetType(POLAR_360); +$graph->SetType(Graph\Configs::getConfig('POLAR_360')); $graph->SetMargin(40, 40, 50, 40); $graph->SetClockwise(true); @@ -38,21 +39,21 @@ $graph->axis->ShowGrid(true, false, true); $graph->axis->SetGridColor('gray', 'gray', 'gray'); -$graph->axis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $graph->axis->SetTitle('X-Axis', 'center'); $graph->axis->SetColor('black', 'black', 'darkred'); -$graph->axis->SetAngleFont(FF_ARIAL, FS_NORMAL, 8); - -$graph->title->Set('Clockwise polar plot'); -$graph->title->SetFont(FF_COMIC, FS_NORMAL, 16); +$graph->axis->SetAngleFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); +$example_title = 'Clockwise polar plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_COMIC'), Graph\Configs::getConfig('FS_NORMAL'), 16); $graph->title->SetColor('navy'); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightblue@0.5'); $graph->Add($p); -//$p2 = new PolarPlot($data2); +//$p2 = new Plot\PolarPlot($data2); //$p2->SetFillColor('red@0.5'); //$graph->Add($p2); diff --git a/Examples/examples_polar/no_test_polarclockex2.php b/Examples/examples_polar/polarclockex2.php similarity index 65% rename from Examples/examples_polar/no_test_polarclockex2.php rename to Examples/examples_polar/polarclockex2.php index cf025cc6..d44fb9ad 100755 --- a/Examples/examples_polar/no_test_polarclockex2.php +++ b/Examples/examples_polar/polarclockex2.php @@ -1,12 +1,13 @@ SetScale('lin', 150); $graph->SetMarginColor('#FFE6C0'); -$graph->SetType(POLAR_360); +$graph->SetType(Graph\Configs::getConfig('POLAR_360')); $graph->SetClockwise(true); $graph->Set90AndMargin(40, 40, 50, 40); @@ -36,21 +37,21 @@ $graph->axis->ShowGrid(true, false, true); $graph->axis->SetGridColor('gray', 'gray', 'gray'); -$graph->axis->SetFont(FF_ARIAL, FS_NORMAL, 8); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $graph->axis->SetTitle('X-Axis', 'center'); $graph->axis->SetColor('black', 'black', 'darkred'); -$graph->axis->SetAngleFont(FF_ARIAL, FS_NORMAL, 8); +$graph->axis->SetAngleFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); $graph->title->Set('Clockwise polar plot (rotated)'); -$graph->title->SetFont(FF_COMIC, FS_NORMAL, 16); +$graph->title->SetFont(Graph\Configs::getConfig('FF_COMIC'), Graph\Configs::getConfig('FS_NORMAL'), 16); $graph->title->SetColor('navy'); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightblue@0.5'); $graph->Add($p); -//$p2 = new PolarPlot($data2); +//$p2 = new Plot\PolarPlot($data2); //$p2->SetFillColor('red@0.5'); //$graph->Add($p2); diff --git a/Examples/examples_polar/no_test_polarex0-180.php b/Examples/examples_polar/polarex0-180.php similarity index 72% rename from Examples/examples_polar/no_test_polarex0-180.php rename to Examples/examples_polar/polarex0-180.php index 00edab33..7ca9b303 100755 --- a/Examples/examples_polar/no_test_polarex0-180.php +++ b/Examples/examples_polar/polarex0-180.php @@ -1,15 +1,14 @@ SetScale('lin'); $graph->SetMargin(35, 35, 25, 25); -$graph->SetType(POLAR_180); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightblue@0.5'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex0.php b/Examples/examples_polar/polarex0.php similarity index 78% rename from Examples/examples_polar/no_test_polarex0.php rename to Examples/examples_polar/polarex0.php index c1bb2ee9..c4afe6be 100755 --- a/Examples/examples_polar/no_test_polarex0.php +++ b/Examples/examples_polar/polarex0.php @@ -1,15 +1,14 @@ SetScale('lin'); $graph->SetMargin(35, 35, 25, 25); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightblue@0.5'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex1.php b/Examples/examples_polar/polarex1.php similarity index 76% rename from Examples/examples_polar/no_test_polarex1.php rename to Examples/examples_polar/polarex1.php index cd774994..161228fe 100755 --- a/Examples/examples_polar/no_test_polarex1.php +++ b/Examples/examples_polar/polarex1.php @@ -1,15 +1,14 @@ SetScale('lin'); -$graph->SetType(POLAR_180); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); //$graph->SetAngle(90); //$graph->SetMargin(30-150,30-150,30+150,30+150); $graph->Set90AndMargin(40, 40, 40, 40); //$graph->axis->SetLabelAlign('right','center'); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetLegend('Test'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex10.php b/Examples/examples_polar/polarex10.php similarity index 64% rename from Examples/examples_polar/no_test_polarex10.php rename to Examples/examples_polar/polarex10.php index 7c132996..baa5dc2f 100755 --- a/Examples/examples_polar/no_test_polarex10.php +++ b/Examples/examples_polar/polarex10.php @@ -1,15 +1,14 @@ SetScale('log', 100); -$graph->SetType(POLAR_360); +$graph->SetType(Graph\Configs::getConfig('POLAR_360')); // Hide frame around graph (by setting width=0) $graph->SetFrame(true, 'white', 1); @@ -43,28 +42,29 @@ $graph->axis->SetColor('black', 'navy', 'darkred'); // Draw the ticks on the bottom side of the radius axis -$graph->axis->SetTickSide(SIDE_DOWN); +$graph->axis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); // Increase the margin for the labels since we changed the // side of the ticks. $graph->axis->SetLabelMargin(6); // Change fonts -$graph->axis->SetFont(FF_ARIAL, FS_NORMAL, 8); -$graph->axis->SetAngleFont(FF_ARIAL, FS_NORMAL, 8); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); +$graph->axis->SetAngleFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); // Setup graph title -$graph->title->Set('Polar plot #10'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$example_title = 'Polar plot #10'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('navy'); // Setup tab title $graph->tabtitle->Set('Microphone #1'); $graph->tabtitle->SetColor('brown:0.5', 'lightyellow'); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightblue@0.5'); -$p->mark->SetType(MARK_SQUARE); +$p->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex2.php b/Examples/examples_polar/polarex2.php similarity index 67% rename from Examples/examples_polar/no_test_polarex2.php rename to Examples/examples_polar/polarex2.php index 6d100f89..87d5dd6c 100755 --- a/Examples/examples_polar/no_test_polarex2.php +++ b/Examples/examples_polar/polarex2.php @@ -1,15 +1,14 @@ SetScale('lin'); - -$graph->title->Set('Polar plot #2'); -$graph->title->SetFont(FF_FONT2, FS_BOLD); +$example_title = 'Polar plot #2'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetColor('navy'); // Hide last labels on the Radius axis // They intersect with the box otherwise $graph->axis->HideLastTickLabel(); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightred@0.5'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex3-lin.php b/Examples/examples_polar/polarex3-lin.php similarity index 60% rename from Examples/examples_polar/no_test_polarex3-lin.php rename to Examples/examples_polar/polarex3-lin.php index 8dc8d61c..5e9f31b3 100755 --- a/Examples/examples_polar/no_test_polarex3-lin.php +++ b/Examples/examples_polar/polarex3-lin.php @@ -1,15 +1,14 @@ SetScale('lin', 200); -$graph->SetType(POLAR_180); - -$graph->title->Set('Polar plot #3'); -$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); +$example_title = 'Polar plot #3'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetColor('navy'); $graph->axis->ShowGrid(true, false); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightred@0.5'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex3.php b/Examples/examples_polar/polarex3.php similarity index 60% rename from Examples/examples_polar/no_test_polarex3.php rename to Examples/examples_polar/polarex3.php index 2ed77e0c..6a9b1df1 100755 --- a/Examples/examples_polar/no_test_polarex3.php +++ b/Examples/examples_polar/polarex3.php @@ -1,15 +1,14 @@ SetScale('log', 100); -$graph->SetType(POLAR_180); - -$graph->title->Set('Polar plot #3'); -$graph->title->SetFont(FF_FONT2, FS_BOLD); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); +$example_title = 'Polar plot #3'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetColor('navy'); $graph->axis->ShowGrid(true, false); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightred@0.5'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex4.php b/Examples/examples_polar/polarex4.php similarity index 67% rename from Examples/examples_polar/no_test_polarex4.php rename to Examples/examples_polar/polarex4.php index 580c642e..75101812 100755 --- a/Examples/examples_polar/no_test_polarex4.php +++ b/Examples/examples_polar/polarex4.php @@ -1,15 +1,14 @@ SetScale('log'); - -$graph->title->Set('Polar plot #4'); -$graph->title->SetFont(FF_FONT2, FS_BOLD); +$example_title = 'Polar plot #4'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetColor('navy'); // Hide last labels on the Radius axis // They intersect with the box otherwise $graph->axis->HideLastTickLabel(); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightred@0.5'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex5.php b/Examples/examples_polar/polarex5.php similarity index 69% rename from Examples/examples_polar/no_test_polarex5.php rename to Examples/examples_polar/polarex5.php index 5c768942..6523b2e6 100755 --- a/Examples/examples_polar/no_test_polarex5.php +++ b/Examples/examples_polar/polarex5.php @@ -1,15 +1,14 @@ SetScale('log'); // Show both major and minor grid lines $graph->axis->ShowGrid(true, true); - -$graph->title->Set('Polar plot #5'); -$graph->title->SetFont(FF_FONT2, FS_BOLD); +$example_title = 'Polar plot #5'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetColor('navy'); // Hide last labels on the Radius axis // They intersect with the box otherwise $graph->axis->HideLastTickLabel(); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightred@0.5'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex6.php b/Examples/examples_polar/polarex6.php similarity index 61% rename from Examples/examples_polar/no_test_polarex6.php rename to Examples/examples_polar/polarex6.php index 57aad90f..5377aacd 100755 --- a/Examples/examples_polar/no_test_polarex6.php +++ b/Examples/examples_polar/polarex6.php @@ -1,15 +1,14 @@ SetScale('log'); -$graph->SetType(POLAR_180); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); // Show both major and minor grid lines $graph->axis->ShowGrid(true, true); - -$graph->title->Set('Polar plot #6'); -$graph->title->SetFont(FF_FONT2, FS_BOLD); +$example_title = 'Polar plot #6'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT2'), Graph\Configs::getConfig('FS_BOLD')); $graph->title->SetColor('navy'); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightred@0.5'); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex7-1.php b/Examples/examples_polar/polarex7-1.php similarity index 60% rename from Examples/examples_polar/no_test_polarex7-1.php rename to Examples/examples_polar/polarex7-1.php index 21b684bd..dafb183d 100755 --- a/Examples/examples_polar/no_test_polarex7-1.php +++ b/Examples/examples_polar/polarex7-1.php @@ -1,15 +1,14 @@ SetScale('log', 100); -$graph->SetType(POLAR_180); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); $graph->SetPlotSize(220, 250); // Hide frame around graph (by setting width=0) $graph->SetFrame(true, 'white', 1); -$graph->SetBackgroundGradient('blue:1.3', 'brown:1.4', GRAD_HOR, BGRAD_PLOT); +$graph->SetBackgroundGradient('blue:1.3', 'brown:1.4', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_PLOT')); // Set color for gradient lines $graph->axis->SetGridColor('gray', 'gray', 'gray'); // Setup axis title $graph->axis->SetTitle('Coverage (in meter)', 'middle'); -$graph->axis->title->SetFont(FF_FONT1, FS_BOLD); - -$graph->title->Set('Polar plot #7'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$example_title = 'Polar plot #7'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('navy'); // Adjust legen box position and color @@ -46,9 +45,9 @@ $graph->legend->SetFillColor('white'); $graph->legend->SetShadow('darkgray@0.5', 5); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightblue@0.5'); -$p->mark->SetType(MARK_SQUARE); +$p->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $p->SetLegend("Mirophone #1\n(No amps)"); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex7-2.php b/Examples/examples_polar/polarex7-2.php similarity index 65% rename from Examples/examples_polar/no_test_polarex7-2.php rename to Examples/examples_polar/polarex7-2.php index b85d6af9..fc02bb9d 100755 --- a/Examples/examples_polar/no_test_polarex7-2.php +++ b/Examples/examples_polar/polarex7-2.php @@ -1,15 +1,14 @@ SetScale('log', 100); -$graph->SetType(POLAR_360); +$graph->SetType(Graph\Configs::getConfig('POLAR_360')); $graph->SetPlotSize(220, 300); // Hide frame around graph (by setting width=0) $graph->SetFrame(true, 'white', 1); -$graph->SetBackgroundGradient('blue:1.3', 'brown:1.4', GRAD_MIDHOR, BGRAD_PLOT); +$graph->SetBackgroundGradient('blue:1.3', 'brown:1.4', Graph\Configs::getConfig('GRAD_MIDHOR'), Graph\Configs::getConfig('BGRAD_PLOT')); // Set color for gradient lines $graph->axis->SetGridColor('gray', 'gray', 'gray'); - -$graph->title->Set('Polar plot #7-2'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$example_title = 'Polar plot #7-2'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('navy'); // Adjust legen box position and color @@ -48,9 +47,9 @@ $graph->legend->SetFillColor('white'); $graph->legend->SetShadow('darkgray@0.5', 5); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('yellow@0.6'); -$p->mark->SetType(MARK_SQUARE); +$p->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $p->SetLegend("Mirophone #1\n(No amps)"); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex7.php b/Examples/examples_polar/polarex7.php similarity index 61% rename from Examples/examples_polar/no_test_polarex7.php rename to Examples/examples_polar/polarex7.php index 9dc86126..04936825 100755 --- a/Examples/examples_polar/no_test_polarex7.php +++ b/Examples/examples_polar/polarex7.php @@ -1,15 +1,14 @@ SetScale('lin', 300); -$graph->SetType(POLAR_180); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); $graph->SetPlotSize(220, 250); // Hide frame around graph (by setting width=0) $graph->SetFrame(true, 'white', 1); -$graph->SetBackgroundGradient('blue:1.3', 'brown:1.4', GRAD_HOR, BGRAD_PLOT); +$graph->SetBackgroundGradient('blue:1.3', 'brown:1.4', Graph\Configs::getConfig('GRAD_HOR'), Graph\Configs::getConfig('BGRAD_PLOT')); // Show both major and minor grid lines $graph->axis->ShowGrid(true, true); @@ -38,10 +37,10 @@ // Setup axis title $graph->axis->SetTitle('Coverage (in meter)', 'middle'); -$graph->axis->title->SetFont(FF_FONT1, FS_BOLD); - -$graph->title->Set('Polar plot #7'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$example_title = 'Polar plot #7'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('navy'); // Adjust legen box position and color @@ -49,9 +48,9 @@ $graph->legend->SetFillColor('white'); $graph->legend->SetShadow('darkgray@0.5', 5); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightblue@0.5'); -$p->mark->SetType(MARK_SQUARE); +$p->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $p->SetLegend("Mirophone #1\n(No amps)"); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex8.php b/Examples/examples_polar/polarex8.php similarity index 68% rename from Examples/examples_polar/no_test_polarex8.php rename to Examples/examples_polar/polarex8.php index a824f8af..a197ca14 100755 --- a/Examples/examples_polar/no_test_polarex8.php +++ b/Examples/examples_polar/polarex8.php @@ -1,15 +1,14 @@ SetScale('log', 100); -$graph->SetType(POLAR_180); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); //$graph->SetPlotSize(250,250); // Hide frame around graph (by setting width=0) @@ -39,10 +38,10 @@ // Setup axis title $graph->axis->SetTitle('Coverage (in meter)', 'middle'); -$graph->axis->title->SetFont(FF_FONT1, FS_BOLD); - -$graph->title->Set('Polar plot #8'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$example_title = 'Polar plot #8'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('navy'); // Adjust legen box position and color @@ -50,9 +49,9 @@ $graph->legend->SetFillColor('white'); $graph->legend->SetShadow('darkgray@0.5', 5); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('white@0.5'); -$p->mark->SetType(MARK_SQUARE); +$p->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $p->SetLegend("Mirophone #1\n(No amps)"); $graph->Add($p); diff --git a/Examples/examples_polar/no_test_polarex9.php b/Examples/examples_polar/polarex9.php similarity index 61% rename from Examples/examples_polar/no_test_polarex9.php rename to Examples/examples_polar/polarex9.php index 856f7591..72964bd2 100755 --- a/Examples/examples_polar/no_test_polarex9.php +++ b/Examples/examples_polar/polarex9.php @@ -1,15 +1,14 @@ SetScale('log', 100); -$graph->SetType(POLAR_180); +$graph->SetType(Graph\Configs::getConfig('POLAR_180')); // Hide frame around graph (by setting width=0) $graph->SetFrame(true, 'white', 1); @@ -37,32 +36,33 @@ $graph->axis->SetColor('black', 'navy', 'darkred'); // Draw the ticks on the bottom side of the radius axis -$graph->axis->SetTickSide(SIDE_DOWN); +$graph->axis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); // Increase the margin for the labels since we changed the // side of the ticks. $graph->axis->SetLabelMargin(6); // Change fonts -$graph->axis->SetFont(FF_ARIAL, FS_NORMAL, 8); -$graph->axis->SetAngleFont(FF_ARIAL, FS_NORMAL, 8); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); +$graph->axis->SetAngleFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); // Setup axis title $graph->axis->SetTitle('Coverage (in meter)', 'middle'); -$graph->axis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Setup graph title -$graph->title->Set('Polar plot #9'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +$example_title = 'Polar plot #9'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('navy'); // Setup tab title $graph->tabtitle->Set('Microphone #1'); $graph->tabtitle->SetColor('brown:0.5', 'lightyellow'); -$p = new PolarPlot($data); +$p = new Plot\PolarPlot($data); $p->SetFillColor('lightblue@0.5'); -$p->mark->SetType(MARK_SQUARE); +$p->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $graph->Add($p); diff --git a/Examples/examples_qr/no_test_qr_template.php b/Examples/examples_qr/no_test_qr_template.php old mode 100755 new mode 100644 index 783b6431..96ace21a --- a/Examples/examples_qr/no_test_qr_template.php +++ b/Examples/examples_qr/no_test_qr_template.php @@ -1,20 +1,20 @@ SetQuietZone($quiet); -if ($back == BACKEND_IMAGE) { +if ($back == Graph\Configs::getConfig('BACKEND_IMAGE')) { $backend->Stroke($data); } else { $str = $backend->Stroke($data); diff --git a/Examples/examples_qr/no_test_qrexample0.php b/Examples/examples_qr/no_test_qrexample0.php old mode 100755 new mode 100644 index 61a954cf..1b4d2f88 --- a/Examples/examples_qr/no_test_qrexample0.php +++ b/Examples/examples_qr/no_test_qrexample0.php @@ -1,7 +1,7 @@ SetModuleWidth(5); diff --git a/Examples/examples_qr/no_test_qrexample02.php b/Examples/examples_qr/no_test_qrexample02.php old mode 100755 new mode 100644 index 267e3cec..858f7414 --- a/Examples/examples_qr/no_test_qrexample02.php +++ b/Examples/examples_qr/no_test_qrexample02.php @@ -1,25 +1,25 @@ SetModuleWidth(5); +// Set the module size (quite big) +$backend->SetModuleWidth(5); - // .. send the barcode back to the browser for the data - $backend->Stroke($data); +// .. send the barcode back to the browser for the data +$backend->Stroke($data); diff --git a/Examples/examples_qr/no_test_qrexample03.php b/Examples/examples_qr/no_test_qrexample03.php old mode 100755 new mode 100644 index 41f04ad0..2ae2c947 --- a/Examples/examples_qr/no_test_qrexample03.php +++ b/Examples/examples_qr/no_test_qrexample03.php @@ -1,29 +1,29 @@ SetModuleWidth(5); +// Set the module size (quite big) +$backend->SetModuleWidth(5); - // Store the barcode in the specifed file - $backend->Stroke($data, $fileName); - list($version, $errorcorrection) = $backend->GetQRInfo(); +// Store the barcode in the specifed file +$backend->Stroke($data, $fileName); +list($version, $errorcorrection) = $backend->GetQRInfo(); - echo "QR Barcode, (Version: ${version}-${errorcorrection}), image stored in file ${fileName}"; +echo "QR Barcode, (Version: ${version}-${errorcorrection}), image stored in file ${fileName}"; diff --git a/Examples/examples_qr/no_test_qrexample04.php b/Examples/examples_qr/no_test_qrexample04.php old mode 100755 new mode 100644 index 9731d5a7..400a4044 --- a/Examples/examples_qr/no_test_qrexample04.php +++ b/Examples/examples_qr/no_test_qrexample04.php @@ -1,26 +1,26 @@ SetModuleWidth(3); +// Set the module size +$backend->SetModuleWidth(3); - // Store the barcode in the specifed file - $backend->Stroke($data); +// Store the barcode in the specifed file +$backend->Stroke($data); diff --git a/Examples/examples_qr/no_test_qrexample05.php b/Examples/examples_qr/no_test_qrexample05.php old mode 100755 new mode 100644 index 09f166e6..f140f076 --- a/Examples/examples_qr/no_test_qrexample05.php +++ b/Examples/examples_qr/no_test_qrexample05.php @@ -1,31 +1,31 @@ SetModuleWidth(4); +// Set the module size +$backend->SetModuleWidth(4); - // Store the barcode in the specifed file - $backend->Stroke($data); +// Store the barcode in the specifed file +$backend->Stroke($data); diff --git a/Examples/examples_qr/no_test_qrexample06.php b/Examples/examples_qr/no_test_qrexample06.php old mode 100755 new mode 100644 index ca1484dd..54ea3a16 --- a/Examples/examples_qr/no_test_qrexample06.php +++ b/Examples/examples_qr/no_test_qrexample06.php @@ -1,28 +1,28 @@ SetImgFormat('jpeg', 80); +// Use Graph\Configs::getConfig('JPEG') format with 80% quality level +$backend->SetImgFormat('jpeg', 80); - // Set the module size - $backend->SetModuleWidth(4); +// Set the module size +$backend->SetModuleWidth(4); - // Store the barcode in the specifed file - $backend->Stroke($data); +// Store the barcode in the specifed file +$backend->Stroke($data); diff --git a/Examples/examples_qr/no_test_qrexample07.php b/Examples/examples_qr/no_test_qrexample07.php old mode 100755 new mode 100644 index c197cef8..b7471ba7 --- a/Examples/examples_qr/no_test_qrexample07.php +++ b/Examples/examples_qr/no_test_qrexample07.php @@ -1,29 +1,29 @@ SetModuleWidth(4); +// Set the module size +$backend->SetModuleWidth(4); - // Store the barcode in the specifed file - $backend->Stroke($data); +// Store the barcode in the specifed file +$backend->Stroke($data); diff --git a/Examples/examples_qr/no_test_qrexample08.php b/Examples/examples_qr/no_test_qrexample08.php old mode 100755 new mode 100644 index d81b57b6..35bdbf22 --- a/Examples/examples_qr/no_test_qrexample08.php +++ b/Examples/examples_qr/no_test_qrexample08.php @@ -1,7 +1,7 @@ SetModuleWidth(5); diff --git a/Examples/examples_qr/no_test_qrexample09.php b/Examples/examples_qr/no_test_qrexample09.php old mode 100755 new mode 100644 index 279e793c..cb79560f --- a/Examples/examples_qr/no_test_qrexample09.php +++ b/Examples/examples_qr/no_test_qrexample09.php @@ -1,7 +1,7 @@ SetModuleWidth(5); diff --git a/Examples/examples_qr/no_test_qrexample10.php b/Examples/examples_qr/no_test_qrexample10.php old mode 100755 new mode 100644 index b64afa1e..81a6ad6a --- a/Examples/examples_qr/no_test_qrexample10.php +++ b/Examples/examples_qr/no_test_qrexample10.php @@ -1,28 +1,28 @@ SetModuleWidth(3); +// Set the module size +$backend->SetModuleWidth(3); - // Set color - $backend->SetColor('brown', 'white'); +// Set color +$backend->SetColor('brown', 'white'); - // Store the barcode in the specifed file - $backend->Stroke($data); +// Store the barcode in the specifed file +$backend->Stroke($data); diff --git a/Examples/examples_qr/no_test_qrexample11.php b/Examples/examples_qr/no_test_qrexample11.php old mode 100755 new mode 100644 index dabdd807..3f47bfc3 --- a/Examples/examples_qr/no_test_qrexample11.php +++ b/Examples/examples_qr/no_test_qrexample11.php @@ -1,24 +1,24 @@ SetModuleWidth($modulewidth); diff --git a/Examples/examples_qr/no_test_qrexample12.php b/Examples/examples_qr/no_test_qrexample12.php old mode 100755 new mode 100644 index 37d39c4f..9c008c74 --- a/Examples/examples_qr/no_test_qrexample12.php +++ b/Examples/examples_qr/no_test_qrexample12.php @@ -1,24 +1,24 @@ SetModuleWidth($modulewidth); diff --git a/Examples/examples_radar/no_test_fixscale_radarex1.php b/Examples/examples_radar/fixed_scale_radarex1.php old mode 100755 new mode 100644 similarity index 60% rename from Examples/examples_radar/no_test_fixscale_radarex1.php rename to Examples/examples_radar/fixed_scale_radarex1.php index a443ff62..cf433ee4 --- a/Examples/examples_radar/no_test_fixscale_radarex1.php +++ b/Examples/examples_radar/fixed_scale_radarex1.php @@ -1,16 +1,16 @@ SetScale('lin', 0, 50); $graph->yscale->ticks->Set(25, 5); $graph->SetColor('white'); @@ -18,7 +18,7 @@ $graph->SetCenter(0.5, 0.55); -$graph->axis->SetFont(FF_FONT1, FS_BOLD); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->axis->SetWeight(2); // Uncomment the following lines to also show grid lines. @@ -27,12 +27,12 @@ $graph->grid->Show(); $graph->ShowMinorTickMarks(); - -$graph->title->Set('Quality result'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Quality result'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->SetTitles(['One', 'Two', 'Three', 'Four', 'Five', 'Sex', 'Seven', 'Eight', 'Nine', 'Ten']); -$plot = new RadarPlot([12, 35, 20, 30, 33, 15, 37]); +$plot = new Plot\RadarPlot([12, 35, 20, 30, 33, 15, 37]); $plot->SetLegend('Goal'); $plot->SetColor('red', 'lightred'); $plot->SetFillColor('lightblue'); diff --git a/Examples/examples_radar/no_test_radarex9.php b/Examples/examples_radar/no_test_radarex9.php deleted file mode 100755 index 0ff20200..00000000 --- a/Examples/examples_radar/no_test_radarex9.php +++ /dev/null @@ -1,39 +0,0 @@ -title->Set('Accumulated PPM'); -$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 12); - -$graph->subtitle->Set('(according to direction)'); -$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); - -$graph->SetTitles($titles); -$graph->SetCenter(0.5, 0.55); -$graph->HideTickMarks(); -$graph->SetColor('lightyellow'); -$graph->axis->SetColor('darkgray@0.3'); -$graph->grid->SetColor('darkgray@0.3'); -$graph->grid->Show(); - -$graph->SetGridDepth(DEPTH_BACK); - -$plot = new RadarPlot($data); -$plot->SetColor('red@0.2'); -$plot->SetLineWeight(1); -$plot->SetFillColor('red@0.7'); -$graph->Add($plot); -$graph->Stroke(); diff --git a/Examples/examples_radar/no_test_radarmarkex1.php b/Examples/examples_radar/no_test_radarmarkex1.php deleted file mode 100755 index 90940aa1..00000000 --- a/Examples/examples_radar/no_test_radarmarkex1.php +++ /dev/null @@ -1,42 +0,0 @@ -title->Set('Radar with marks'); -$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 12); - -$graph->SetTitles($titles); -$graph->SetCenter(0.5, 0.55); -$graph->HideTickMarks(); -$graph->SetColor('lightgreen@0.7'); -$graph->axis->SetColor('darkgray'); -$graph->grid->SetColor('darkgray'); -$graph->grid->Show(); - -$graph->axis->title->SetFont(FF_ARIAL, FS_NORMAL, 12); -$graph->axis->title->SetMargin(5); -$graph->SetGridDepth(DEPTH_BACK); -$graph->SetSize(0.6); - -$plot = new RadarPlot($data); -$plot->SetColor('red@0.2'); -$plot->SetLineWeight(1); -$plot->SetFillColor('red@0.7'); - -$plot->mark->SetType(MARK_IMG_SBALL, 'red'); - -$graph->Add($plot); -$graph->Stroke(); diff --git a/Examples/examples_radar/no_test_radarex1.php b/Examples/examples_radar/radarex1.php old mode 100755 new mode 100644 similarity index 60% rename from Examples/examples_radar/no_test_radarex1.php rename to Examples/examples_radar/radarex1.php index 68f48d14..86af8f25 --- a/Examples/examples_radar/no_test_radarex1.php +++ b/Examples/examples_radar/radarex1.php @@ -1,14 +1,12 @@ Add($plot); diff --git a/Examples/examples_radar/no_test_radarex2.php b/Examples/examples_radar/radarex2.php old mode 100755 new mode 100644 similarity index 50% rename from Examples/examples_radar/no_test_radarex2.php rename to Examples/examples_radar/radarex2.php index 856a82b9..7b84aa3f --- a/Examples/examples_radar/no_test_radarex2.php +++ b/Examples/examples_radar/radarex2.php @@ -1,26 +1,26 @@ title->Set('Weekly goals'); -$graph->subtitle->Set('Year 2003'); +$__width = 300; +$__height = 200; +$graph = new Graph\RadarGraph($__width, $__height); +$example_title = 'Weekly goals'; +$graph->title->set($example_title); +$subtitle_text = 'Year 2003'; +$graph->subtitle->Set($subtitle_text); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetFillColor('lightred'); $graph->SetSize(0.6); $graph->SetPos(0.5, 0.6); diff --git a/Examples/examples_radar/no_test_radarex3.php b/Examples/examples_radar/radarex3.php old mode 100755 new mode 100644 similarity index 75% rename from Examples/examples_radar/no_test_radarex3.php rename to Examples/examples_radar/radarex3.php index 2ce27bd8..a4751bbe --- a/Examples/examples_radar/no_test_radarex3.php +++ b/Examples/examples_radar/radarex3.php @@ -1,13 +1,12 @@ gDateLocale->GetShortMonth(); $graph->SetTitles($titles); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetFillColor('lightblue'); // Add the plot and display the graph diff --git a/Examples/examples_radar/no_test_radarex4.php b/Examples/examples_radar/radarex4.php old mode 100755 new mode 100644 similarity index 79% rename from Examples/examples_radar/no_test_radarex4.php rename to Examples/examples_radar/radarex4.php index de47f2c3..10626086 --- a/Examples/examples_radar/no_test_radarex4.php +++ b/Examples/examples_radar/radarex4.php @@ -1,13 +1,12 @@ SetShadow(); @@ -28,7 +27,7 @@ $graph->grid->Show(); $graph->grid->SetLineStyle('dashed'); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetFillColor('lightblue'); // Add the plot and display the graph diff --git a/Examples/examples_radar/no_test_radarex5.php b/Examples/examples_radar/radarex5.php old mode 100755 new mode 100644 similarity index 79% rename from Examples/examples_radar/no_test_radarex5.php rename to Examples/examples_radar/radarex5.php index 89c91a4c..df981fc1 --- a/Examples/examples_radar/no_test_radarex5.php +++ b/Examples/examples_radar/radarex5.php @@ -1,13 +1,12 @@ gDateLocale->GetShortMonth(); @@ -26,7 +25,7 @@ $graph->grid->SetColor('darkred'); $graph->grid->SetLineStyle('dotted'); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetFillColor('lightblue'); // Add the plot and display the graph diff --git a/Examples/examples_radar/no_test_radarex6.1.php b/Examples/examples_radar/radarex6.1.php old mode 100755 new mode 100644 similarity index 83% rename from Examples/examples_radar/no_test_radarex6.1.php rename to Examples/examples_radar/radarex6.1.php index 783098e5..81718a73 --- a/Examples/examples_radar/no_test_radarex6.1.php +++ b/Examples/examples_radar/radarex6.1.php @@ -1,13 +1,12 @@ SetShadow(); @@ -36,11 +35,11 @@ $graph->grid->SetColor('darkred'); $graph->grid->SetLineStyle('dotted'); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetFillColor('lightblue'); $plot->SetLegend('QA results'); -$plot2 = new RadarPlot($data2); +$plot2 = new Plot\RadarPlot($data2); $plot2->SetLegend('Target'); $plot2->SetColor('red'); $plot2->SetFill(false); diff --git a/Examples/examples_radar/no_test_radarex6.php b/Examples/examples_radar/radarex6.php old mode 100755 new mode 100644 similarity index 84% rename from Examples/examples_radar/no_test_radarex6.php rename to Examples/examples_radar/radarex6.php index 97142746..a1e4d2c7 --- a/Examples/examples_radar/no_test_radarex6.php +++ b/Examples/examples_radar/radarex6.php @@ -1,13 +1,12 @@ SetShadow(); @@ -34,7 +33,7 @@ $graph->grid->SetColor('darkred'); $graph->grid->SetLineStyle('dashed'); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetFillColor('lightblue'); $plot->SetLegend('QA results'); diff --git a/Examples/examples_radar/no_test_radarex7.php b/Examples/examples_radar/radarex7.php old mode 100755 new mode 100644 similarity index 65% rename from Examples/examples_radar/no_test_radarex7.php rename to Examples/examples_radar/radarex7.php index c23d4887..a126c608 --- a/Examples/examples_radar/no_test_radarex7.php +++ b/Examples/examples_radar/radarex7.php @@ -1,18 +1,17 @@ SetColor('white'); @@ -22,7 +21,7 @@ $graph->SetCenter(0.4, 0.55); // Setup the axis formatting -$graph->axis->SetFont(FF_FONT1, FS_BOLD); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->axis->SetWeight(2); // Setup the grid lines @@ -31,19 +30,18 @@ $graph->grid->Show(); $graph->HideTickMarks(); -// Setup graph titles -$graph->title->Set('Quality result'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// Setup graph titles$example_title='Quality result'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->SetTitles(['One', 'Two', 'Three', 'Four', 'Five', 'Sex', 'Seven', 'Eight', 'Nine', 'Ten']); // Create the first radar plot -$plot = new RadarPlot([30, 80, 60, 40, 71, 81, 47]); +$plot = new Plot\RadarPlot([30, 80, 60, 40, 71, 81, 47]); $plot->SetLegend('Goal'); $plot->SetColor('red', 'lightred'); $plot->SetFill(false); $plot->SetLineWeight(2); // Create the second radar plot -$plot2 = new RadarPlot([70, 40, 30, 80, 31, 51, 14]); +$plot2 = new Plot\RadarPlot([70, 40, 30, 80, 31, 51, 14]); $plot2->SetLegend('Actual'); $plot2->SetColor('blue', 'lightred'); diff --git a/Examples/examples_radar/no_test_radarex8.1.php b/Examples/examples_radar/radarex8.1.php old mode 100755 new mode 100644 similarity index 65% rename from Examples/examples_radar/no_test_radarex8.1.php rename to Examples/examples_radar/radarex8.1.php index 0a08eb38..4f797123 --- a/Examples/examples_radar/no_test_radarex8.1.php +++ b/Examples/examples_radar/radarex8.1.php @@ -1,18 +1,17 @@ img->SetAntiAliasing(); // Set background color and shadow @@ -23,7 +22,7 @@ $graph->SetCenter(0.4, 0.55); // Setup the axis formatting -$graph->axis->SetFont(FF_FONT1, FS_BOLD); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Setup the grid lines $graph->grid->SetLineStyle('solid'); @@ -31,21 +30,20 @@ $graph->grid->Show(); $graph->HideTickMarks(); -// Setup graph titles -$graph->title->Set('Quality result'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// Setup graph titles$example_title='Quality result'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->SetTitles($graph->gDateLocale->GetShortMonth()); // Create the first radar plot -$plot = new RadarPlot([70, 80, 60, 90, 71, 81, 47]); +$plot = new Plot\RadarPlot([70, 80, 60, 90, 71, 81, 47]); $plot->SetLegend('Goal'); $plot->SetColor('red', 'lightred'); $plot->SetFill(false); $plot->SetLineWeight(2); // Create the second radar plot -$plot2 = new RadarPlot([70, 40, 30, 80, 31, 51, 14]); +$plot2 = new Plot\RadarPlot([70, 40, 30, 80, 31, 51, 14]); $plot2->SetLegend('Actual'); $plot2->SetLineWeight(2); $plot2->SetColor('blue'); diff --git a/Examples/examples_radar/no_test_radarex8.php b/Examples/examples_radar/radarex8.php old mode 100755 new mode 100644 similarity index 65% rename from Examples/examples_radar/no_test_radarex8.php rename to Examples/examples_radar/radarex8.php index fcfccfc0..74dd5121 --- a/Examples/examples_radar/no_test_radarex8.php +++ b/Examples/examples_radar/radarex8.php @@ -1,18 +1,17 @@ img->SetAntiAliasing(); // Set background color and shadow @@ -23,7 +22,7 @@ $graph->SetCenter(0.4, 0.55); // Setup the axis formatting -$graph->axis->SetFont(FF_FONT1, FS_BOLD); +$graph->axis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Setup the grid lines $graph->grid->SetLineStyle('solid'); @@ -31,20 +30,19 @@ $graph->grid->Show(); $graph->HideTickMarks(); -// Setup graph titles -$graph->title->Set('Quality result'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +// Setup graph titles$example_title='Quality result'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->SetTitles($graph->gDateLocale->GetShortMonth()); // Create the first radar plot -$plot = new RadarPlot([70, 80, 60, 90, 71, 81, 47]); +$plot = new Plot\RadarPlot([70, 80, 60, 90, 71, 81, 47]); $plot->SetLegend('Goal'); $plot->SetColor('red', 'lightred'); $plot->SetFill(false); $plot->SetLineWeight(2); // Create the second radar plot -$plot2 = new RadarPlot([70, 40, 30, 80, 31, 51, 14]); +$plot2 = new Plot\RadarPlot([70, 40, 30, 80, 31, 51, 14]); $plot2->SetLegend('Actual'); $plot2->SetLineWeight(2); $plot2->SetColor('blue'); diff --git a/Examples/examples_radar/radarex9.php b/Examples/examples_radar/radarex9.php new file mode 100644 index 00000000..639141f1 --- /dev/null +++ b/Examples/examples_radar/radarex9.php @@ -0,0 +1,40 @@ +title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_NORMAL'), 12); + +$subtitle_text = '(according to direction)'; +$graph->subtitle->Set($subtitle_text); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_ITALIC'), 10); + +$graph->SetTitles($titles); +$graph->SetCenter(0.5, 0.55); +$graph->HideTickMarks(); +$graph->SetColor('lightyellow'); +$graph->axis->SetColor('darkgray@0.3'); +$graph->grid->SetColor('darkgray@0.3'); +$graph->grid->Show(); + +$graph->SetGridDepth(Graph\Configs::getConfig('DEPTH_BACK')); + +$plot = new Plot\RadarPlot($data); +$plot->SetColor('red@0.2'); +$plot->SetLineWeight(1); +$plot->SetFillColor('red@0.7'); +$graph->Add($plot); +$graph->Stroke(); diff --git a/Examples/examples_radar/radarex_issue.php b/Examples/examples_radar/radarex_issue.php new file mode 100644 index 00000000..99540c67 --- /dev/null +++ b/Examples/examples_radar/radarex_issue.php @@ -0,0 +1,52 @@ +SetCenter(0.52, 0.5); +$graph->SetScale('lin', 0, 8); +$graph->SetFrame(false); +$graph->legend->SetPos(0.77, 0.02, 'left', 'top'); + +$graph->legend->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 16); + +$graph->SetTitles($titles); + +$graph->axis->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->axis->SetWeight(2); + +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD'), 16); +$graph->axis->SetColor('black', [225, 100, 150, 0.8]); +$graph->axis->scale->ticks->Set(1, 2, 3); +$graph->grid->Show(); +$teamPlot = new Plot\RadarPlot($data); +$teamPlot->SetColor('blue', 'lightblue'); +$teamPlot->SetLegend('Initial Assessment'); +$graph->Add($teamPlot); +$img = $graph->Stroke(); diff --git a/Examples/examples_radar/no_test_radarlogex1-aa.php b/Examples/examples_radar/radarlogex1-aa.php old mode 100755 new mode 100644 similarity index 72% rename from Examples/examples_radar/no_test_radarlogex1-aa.php rename to Examples/examples_radar/radarlogex1-aa.php index 310285b3..2f9cdc57 --- a/Examples/examples_radar/no_test_radarlogex1-aa.php +++ b/Examples/examples_radar/radarlogex1-aa.php @@ -1,12 +1,12 @@ SetScale('log'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); -$graph->title->Set('Logarithmic scale'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); +$example_title = 'Logarithmic scale'; +$graph->title->set($example_title); $graph->title->SetMargin(10); // Make the radar graph fill out it's bounding box @@ -43,18 +44,18 @@ $graph->yscale->ticks->SetMarkColor('black', 'darkgray'); // Set the axis title font -$graph->axis->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->axis->title->SetColor('darkred:0.8'); // Use blue axis $graph->axis->SetColor('blue'); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetLineWeight(1); $plot->SetColor('forestgreen'); $plot->SetFillColor('forestgreen@0.9'); -$plot2 = new RadarPlot($data2); +$plot2 = new Plot\RadarPlot($data2); $plot2->SetLineWeight(2); $plot2->SetColor('red'); $plot2->SetFillColor('red@0.9'); diff --git a/Examples/examples_radar/no_test_radarlogex1.php b/Examples/examples_radar/radarlogex1.php old mode 100755 new mode 100644 similarity index 70% rename from Examples/examples_radar/no_test_radarlogex1.php rename to Examples/examples_radar/radarlogex1.php index dd68c3d7..e7cc3ffc --- a/Examples/examples_radar/no_test_radarlogex1.php +++ b/Examples/examples_radar/radarlogex1.php @@ -1,12 +1,12 @@ SetScale('log'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); -$graph->title->Set('Logarithmic scale'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); +$example_title = 'Logarithmic scale'; +$graph->title->set($example_title); $graph->title->SetMargin(10); // Make the radar graph fill out it's bounding box @@ -38,18 +39,18 @@ $graph->yscale->ticks->SetMarkColor('black', 'darkgray'); // Set the axis title font -$graph->axis->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->axis->title->SetColor('darkred:0.8'); // Use blue axis $graph->axis->SetColor('blue'); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetLineWeight(1); $plot->SetColor('forestgreen'); $plot->SetFillColor('forestgreen@0.9'); -$plot2 = new RadarPlot($data2); +$plot2 = new Plot\RadarPlot($data2); $plot2->SetLineWeight(2); $plot2->SetColor('red'); $plot2->SetFillColor('red@0.9'); diff --git a/Examples/examples_radar/no_test_radarlogex2.php b/Examples/examples_radar/radarlogex2.php old mode 100755 new mode 100644 similarity index 79% rename from Examples/examples_radar/no_test_radarlogex2.php rename to Examples/examples_radar/radarlogex2.php index 629a1a09..40c18123 --- a/Examples/examples_radar/no_test_radarlogex2.php +++ b/Examples/examples_radar/radarlogex2.php @@ -1,12 +1,12 @@ yscale->ticks->SetMarkColor('black', 'darkgray'); // Set the axis title font -$graph->axis->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); // Use blue axis $graph->axis->SetColor('blue'); -$plot = new RadarPlot($data); +$plot = new Plot\RadarPlot($data); $plot->SetLineWeight(2); $plot->SetColor('forestgreen'); diff --git a/Examples/examples_radar/radarmarkex1.php b/Examples/examples_radar/radarmarkex1.php new file mode 100644 index 00000000..7d8c1cbe --- /dev/null +++ b/Examples/examples_radar/radarmarkex1.php @@ -0,0 +1,43 @@ +title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_NORMAL'), 12); + +$graph->SetTitles($titles); +$graph->SetCenter(0.5, 0.55); +$graph->HideTickMarks(); +$graph->SetColor('lightgreen@0.7'); +$graph->axis->SetColor('darkgray'); +$graph->grid->SetColor('darkgray'); +$graph->grid->Show(); + +$graph->axis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); +$graph->axis->title->SetMargin(5); +$graph->SetGridDepth(Graph\Configs::getConfig('DEPTH_BACK')); +$graph->SetSize(0.6); + +$plot = new Plot\RadarPlot($data); +$plot->SetColor('red@0.2'); +$plot->SetLineWeight(1); +$plot->SetFillColor('red@0.7'); + +$plot->mark->SetType(Graph\Configs::getConfig('MARK_IMG_SBALL'), 'red'); + +$graph->Add($plot); +$graph->Stroke(); diff --git a/Examples/examples_rotate/rotateex1.php b/Examples/examples_rotate/rotateex1.php old mode 100755 new mode 100644 index 49f28218..6e2c5411 --- a/Examples/examples_rotate/rotateex1.php +++ b/Examples/examples_rotate/rotateex1.php @@ -1,7 +1,7 @@ title->Set('Example 1 rotated graph (40 degree)'); $graph->legend->Pos(0.05, 0.1, 'right', 'top'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $lineplot->SetColor('blue'); $lineplot->SetWeight(2); diff --git a/Examples/examples_rotate/rotex0.php b/Examples/examples_rotate/rotex0.php old mode 100755 new mode 100644 index 88748310..bd42778b --- a/Examples/examples_rotate/rotex0.php +++ b/Examples/examples_rotate/rotex0.php @@ -1,7 +1,7 @@ SetMargin(30, 20, 40, 30); -$g->title->Set('Bezier interpolation'); -$g->title->SetFont(FF_ARIAL, FS_NORMAL, 12); -$g->subtitle->Set('(Control points shown in red)'); +$example_title = 'Bezier interpolation'; +$g->title->set($example_title); +$g->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); +$subtitle_text = '(Control points shown in red)'; +$g->subtitle->Set($subtitle_text); $g->subtitle->SetColor('darkred'); $g->SetMarginColor('lightblue'); diff --git a/Examples/examples_scatter/ccbp_ex1.php b/Examples/examples_scatter/ccbp_ex1.php old mode 100755 new mode 100644 index c30bd9f7..10d6455e --- a/Examples/examples_scatter/ccbp_ex1.php +++ b/Examples/examples_scatter/ccbp_ex1.php @@ -1,7 +1,7 @@ mark->SetType(MARK_DIAMOND); +$sp->mark->SetType(Graph\Configs::getConfig('MARK_DIAMOND')); $sp->mark->SetFillColor('white'); $sp->mark->SetSize(12); diff --git a/Examples/examples_scatter/ccbp_ex2.php b/Examples/examples_scatter/ccbp_ex2.php old mode 100755 new mode 100644 index 5c2bbf53..b44d1aa4 --- a/Examples/examples_scatter/ccbp_ex2.php +++ b/Examples/examples_scatter/ccbp_ex2.php @@ -1,7 +1,7 @@ mark->SetType(MARK_DIAMOND); +$sp->mark->SetType(Graph\Configs::getConfig('MARK_DIAMOND')); $sp->mark->SetFillColor('white'); $sp->mark->SetSize(12); diff --git a/Examples/examples_scatter/fieldscatterex1.php b/Examples/examples_scatter/fieldscatterex1.php old mode 100755 new mode 100644 index 81df57b4..112712ca --- a/Examples/examples_scatter/fieldscatterex1.php +++ b/Examples/examples_scatter/fieldscatterex1.php @@ -1,7 +1,7 @@ SetScale('intlin', 0, 100, 0, 10); $graph->SetMarginColor('lightblue'); -// ..and titles -$graph->title->Set('Field plot'); +// ..and titles$example_title='Field plot'; $graph->title->set($example_title); // Setup the field plot $fp = new Plot\FieldPlot($datay, $datax, $angle); diff --git a/Examples/examples_scatter/footerex1.php b/Examples/examples_scatter/footerex1.php old mode 100755 new mode 100644 index 25bf9b35..19d939d0 --- a/Examples/examples_scatter/footerex1.php +++ b/Examples/examples_scatter/footerex1.php @@ -1,7 +1,7 @@ tabtitle->Set(' Year 2003 '); -$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13); +$graph->tabtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 13); $graph->tabtitle->SetColor('darkred', '#E1E1FF'); // Enable X-grid as well @@ -31,13 +31,13 @@ $graph->xaxis->SetTickLabels($graph->gDateLocale->GetShortMonth()); $graph->footer->left->Set('L. footer'); -$graph->footer->left->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->footer->left->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $graph->footer->left->SetColor('darkred'); $graph->footer->center->Set('C. footer'); -$graph->footer->center->SetFont(FF_ARIAL, FS_BOLD, 12); +$graph->footer->center->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->footer->center->SetColor('darkred'); $graph->footer->right->Set('R. footer'); -$graph->footer->right->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->footer->right->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $graph->footer->right->SetColor('darkred'); // Create the plot @@ -45,13 +45,13 @@ $p1->SetColor('navy'); // Use an image of favourite car as marker -$p1->mark->SetType(MARK_IMG, __DIR__ . '/../assets/saab_95.jpg', 0.5); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_IMG'), __DIR__ . '/../assets/saab_95.jpg', 0.5); // Displayes value on top of marker image $p1->value->SetFormat('%d mil'); $p1->value->Show(); $p1->value->SetColor('darkred'); -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); // Increase the margin so that the value is printed avove tje // img marker $p1->value->SetMargin(14); diff --git a/Examples/examples_scatter/impulsex1.php b/Examples/examples_scatter/impulsex1.php old mode 100755 new mode 100644 index 75ee623e..c69bff91 --- a/Examples/examples_scatter/impulsex1.php +++ b/Examples/examples_scatter/impulsex1.php @@ -1,29 +1,29 @@ SetScale('textlin'); +$graph3 = new Graph\Graph($__width, $__height); +$graph3->SetScale('textlin'); -$graph->SetShadow(); -$graph->img->SetMargin(40, 40, 40, 40); - -$graph->title->Set('Simple mpuls plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$graph3->SetShadow(); +$graph3->img->SetMargin(40, 40, 40, 40); +$example_title = 'Simple impulse plot'; +$graph3->title->set($example_title); +$graph3->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $sp1 = new Plot\ScatterPlot($datay); -$sp1->mark->SetType(MARK_SQUARE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $sp1->SetImpuls(); -$graph->Add($sp1); -$graph->Stroke(); +$graph3->Add($sp1); +$graph3->Stroke(); diff --git a/Examples/examples_scatter/impulsex2.php b/Examples/examples_scatter/impulsex2.php old mode 100755 new mode 100644 index ed182848..b07a720a --- a/Examples/examples_scatter/impulsex2.php +++ b/Examples/examples_scatter/impulsex2.php @@ -1,7 +1,7 @@ SetShadow(); $graph->img->SetMargin(40, 40, 40, 40); - -$graph->title->Set('Impuls plot, variant 2'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Impuls plot, variant 2'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xaxis->title->Set('Impuls respons'); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $sp1 = new Plot\ScatterPlot($datay); //,$datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $sp1->mark->SetFillColor('red'); $sp1->mark->SetWidth(4); $sp1->SetImpuls(); diff --git a/Examples/examples_scatter/impulsex3.php b/Examples/examples_scatter/impulsex3.php old mode 100755 new mode 100644 index 65da5e1a..6b189d7f --- a/Examples/examples_scatter/impulsex3.php +++ b/Examples/examples_scatter/impulsex3.php @@ -1,7 +1,7 @@ SetScale('intlin'); $graph->SetShadow(); $graph->SetBox(); - -$graph->title->Set('Impuls Example 3'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Impuls Example 3'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Set format callback for labels $graph->yaxis->SetLabelFormatCallback('mycallback'); @@ -43,12 +43,12 @@ function mycallback($l) // of the ticks on the Y-axis $graph->yaxis->SetLabelMargin(12); $graph->xaxis->SetLabelMargin(6); -$graph->yaxis->SetTickSide(SIDE_LEFT); -$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); -// Create a new impuls type scatter plot +// Create a new impulse type scatter plot $sp1 = new Plot\ScatterPlot($datay); -$sp1->mark->SetType(MARK_SQUARE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $sp1->mark->SetFillColor('red'); $sp1->SetImpuls(); $sp1->SetColor('blue'); diff --git a/Examples/examples_scatter/impulsex4.php b/Examples/examples_scatter/impulsex4.php old mode 100755 new mode 100644 index bbbe0b8a..4617288c --- a/Examples/examples_scatter/impulsex4.php +++ b/Examples/examples_scatter/impulsex4.php @@ -1,7 +1,7 @@ SetShadow(); $graph->SetBox(); -$graph->title->Set('Impuls Example 4'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Impuls Example 4'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Set some other color then the boring default $graph->SetColor('lightyellow'); @@ -51,16 +52,16 @@ // of the ticks on the Y-axis $graph->yaxis->SetLabelMargin(12); $graph->xaxis->SetLabelMargin(6); -$graph->yaxis->SetTickSide(SIDE_LEFT); -$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); // Add mark graph with static lines -$line = new Plot\PlotLine(HORIZONTAL, 0, 'black', 2); +$line = new Plot\PlotLine(Graph\Configs::getConfig('HORIZONTAL'), 0, 'black', 2); $graph->AddLine($line); -// Create a new impuls type scatter plot +// Create a new impulse type scatter plot $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_SQUARE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_SQUARE')); $sp1->mark->SetFillColor('red'); $sp1->mark->SetWidth(3); diff --git a/Examples/examples_scatter/loglogex1.php b/Examples/examples_scatter/loglogex1.php old mode 100755 new mode 100644 index d41e754b..eb2be7f0 --- a/Examples/examples_scatter/loglogex1.php +++ b/Examples/examples_scatter/loglogex1.php @@ -1,7 +1,7 @@ y2axis->SetColor('blue', 'blue'); $graph->img->SetMargin(50, 70, 40, 50); -$graph->title->Set('Geoelektrik'); +$example_title = 'Geoelektrik'; +$graph->title->set($example_title); $graph->xaxis->title->Set('Auslage ab/2 [m]'); $graph->yaxis->title->Set('rho_s [Ohm m]'); $graph->y2axis->title->Set('mn/2 [m]'); $graph->y2axis->title->SetColor('blue'); $graph->y2axis->SetTitleMargin(35); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD); -$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $graph->xgrid->Show(true, true); $graph->ygrid->Show(true, true); @@ -43,13 +44,13 @@ $lineplot = new Plot\LinePlot($rhos, $ab2); $lineplot->SetWeight(1); -$lineplot->mark->SetType(MARK_FILLEDCIRCLE); +$lineplot->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $lineplot->mark->SetWidth(2); // Create scatter plot $scplot = new Plot\ScatterPlot($mn2, $ab2); -$scplot->mark->SetType(MARK_FILLEDCIRCLE); +$scplot->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $scplot->mark->SetColor('blue'); $scplot->mark->SetWidth(2); diff --git a/Examples/examples_scatter/markflagex1.php b/Examples/examples_scatter/markflagex1.php old mode 100755 new mode 100644 index e65719b6..6e220a3e --- a/Examples/examples_scatter/markflagex1.php +++ b/Examples/examples_scatter/markflagex1.php @@ -1,7 +1,7 @@ SetColor('navy'); // Use a flag -$p1->mark->SetType(MARK_FLAG1, 197); +$p1->mark->SetType(Graph\Configs::getConfig('MARK_FLAG1'), 197); // Displayes value on top of marker image $p1->value->SetFormat('%d mil'); $p1->value->Show(); $p1->value->SetColor('darkred'); -$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$p1->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); // Increase the margin so that the value is printed avove tje // img marker $p1->value->SetMargin(14); @@ -58,13 +58,13 @@ $p2->SetColor('navy'); // Use a flag -$p2->mark->SetType(MARK_FLAG1, 'united states'); +$p2->mark->SetType(Graph\Configs::getConfig('MARK_FLAG1'), 'united states'); // Displayes value on top of marker image $p2->value->SetFormat('%d mil'); $p2->value->Show(); $p2->value->SetColor('darkred'); -$p2->value->SetFont(FF_ARIAL, FS_BOLD, 10); +$p2->value->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); // Increase the margin so that the value is printed avove tje // img marker $p2->value->SetMargin(14); diff --git a/Examples/examples_scatter/no_dim_balloonex1.php b/Examples/examples_scatter/no_dim_balloonex1.php old mode 100755 new mode 100644 index ca8925f3..91a4c165 --- a/Examples/examples_scatter/no_dim_balloonex1.php +++ b/Examples/examples_scatter/no_dim_balloonex1.php @@ -1,7 +1,7 @@ SetScale('linlin'); $graph->img->SetMargin(40, 100, 40, 40); $graph->SetShadow(); -$graph->title->Set('Example of ballon scatter plot'); +$example_title = 'Example of ballon scatter plot'; +$graph->title->set($example_title); // Use a lot of grace to get large scales $graph->yaxis->scale->SetGrace(50, 10); @@ -46,11 +47,11 @@ // Create the scatter plot $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); // Uncomment the following two lines to display the values $sp1->value->Show(); -$sp1->value->SetFont(FF_FONT1, FS_BOLD); +$sp1->value->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Specify the callback $sp1->mark->SetCallback($FCallback); diff --git a/Examples/examples_scatter/no_dim_balloonex2.php b/Examples/examples_scatter/no_dim_balloonex2.php old mode 100755 new mode 100644 index 27c53141..1e323e15 --- a/Examples/examples_scatter/no_dim_balloonex2.php +++ b/Examples/examples_scatter/no_dim_balloonex2.php @@ -1,7 +1,7 @@ SetScale('intlin'); $graph->SetMargin(40, 40, 40, 40); $graph->SetMarginColor('wheat'); - -$graph->title->Set('Example of ballon scatter plot with X,Y callback'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$example_title = 'Example of ballon scatter plot with X,Y callback'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetMargin(10); // Use a lot of grace to get large scales since the ballon have @@ -65,11 +65,11 @@ // Create the scatter plot $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); // Uncomment the following two lines to display the values $sp1->value->Show(); -$sp1->value->SetFont(FF_FONT1, FS_BOLD); +$sp1->value->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Specify the callback $sp1->mark->SetCallbackYX($FCallback); diff --git a/Examples/examples_scatter/pushpinex1.php b/Examples/examples_scatter/pushpinex1.php old mode 100755 new mode 100644 index 5df76fbf..19a2429a --- a/Examples/examples_scatter/pushpinex1.php +++ b/Examples/examples_scatter/pushpinex1.php @@ -1,7 +1,7 @@ yaxis->Hide(); // Use a worldmap as the background and let it fill the plot area -$graph->SetBackgroundImage(WORLDMAP, BGIMG_FILLPLOT); +$graph->SetBackgroundImage(Graph\Configs::getConfig('WORLDMAP'), Graph\Configs::getConfig('BGIMG_FILLPLOT')); -// Setup a nice title with a striped bevel background -$graph->title->Set('Pushpin graph'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +// Setup a nice title with a striped bevel background$example_title='Pushpin graph'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('white'); -$graph->SetTitleBackground('darkgreen', TITLEBKG_STYLE1, TITLEBKG_FRAME_BEVEL); -$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED, 'blue', 'darkgreen'); +$graph->SetTitleBackground('darkgreen', Graph\Configs::getConfig('TITLEBKG_STYLE1'), Graph\Configs::getConfig('TITLEBKG_FRAME_BEVEL')); +$graph->SetTitleBackgroundFillStyle(Graph\Configs::getConfig('TITLEBKG_FILLSTYLE_HSTRIPED'), 'blue', 'darkgreen'); // Finally create the scatterplot $sp = new Plot\ScatterPlot($datay, $datax); // We want the markers to be an image -$sp->mark->SetType(MARK_IMG_PUSHPIN, 'blue', 0.6); +$sp->mark->SetType(Graph\Configs::getConfig('MARK_IMG_PUSHPIN'), 'blue', 0.6); // Install the Y-X callback for the markers $sp->mark->SetCallbackYX($markCallback); diff --git a/Examples/examples_scatter/pushpinex2.php b/Examples/examples_scatter/pushpinex2.php old mode 100755 new mode 100644 index 9c88de04..95d2944d --- a/Examples/examples_scatter/pushpinex2.php +++ b/Examples/examples_scatter/pushpinex2.php @@ -1,7 +1,7 @@ yaxis->Hide(); // Use a worldmap as the background and let it fill the plot area -$graph->SetBackgroundImage(WORLDMAP, BGIMG_FILLPLOT); +$graph->SetBackgroundImage(Graph\Configs::getConfig('WORLDMAP'), Graph\Configs::getConfig('BGIMG_FILLPLOT')); -// Setup a nice title with a striped bevel background -$graph->title->Set('Pushpin graph'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16); +// Setup a nice title with a striped bevel background$example_title='Pushpin graph'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $graph->title->SetColor('white'); -$graph->SetTitleBackground('darkgreen', TITLEBKG_STYLE1, TITLEBKG_FRAME_BEVEL); -$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED, 'blue', 'darkgreen'); +$graph->SetTitleBackground('darkgreen', Graph\Configs::getConfig('TITLEBKG_STYLE1'), Graph\Configs::getConfig('TITLEBKG_FRAME_BEVEL')); +$graph->SetTitleBackgroundFillStyle(Graph\Configs::getConfig('TITLEBKG_FILLSTYLE_HSTRIPED'), 'blue', 'darkgreen'); // Finally create the lineplot $lp = new Plot\LinePlot($datay, $datax); $lp->SetColor('lightgray'); // We want the markers to be an image -$lp->mark->SetType(MARK_IMG_PUSHPIN, 'blue', 0.6); +$lp->mark->SetType(Graph\Configs::getConfig('MARK_IMG_PUSHPIN'), 'blue', 0.6); // Install the Y-X callback for the markers $lp->mark->SetCallbackYX($markCallback); diff --git a/Examples/examples_scatter/scatterex1.php b/Examples/examples_scatter/scatterex1.php old mode 100755 new mode 100644 index dbe9ed17..4626d647 --- a/Examples/examples_scatter/scatterex1.php +++ b/Examples/examples_scatter/scatterex1.php @@ -1,7 +1,7 @@ img->SetMargin(40, 40, 40, 40); $graph->SetShadow(); - -$graph->title->Set('A simple scatter plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'A simple scatter plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $sp1 = new Plot\ScatterPlot($datay, $datax); diff --git a/Examples/examples_scatter/scatterex2.php b/Examples/examples_scatter/scatterex2.php old mode 100755 new mode 100644 index 98e2b9e7..347050f7 --- a/Examples/examples_scatter/scatterex2.php +++ b/Examples/examples_scatter/scatterex2.php @@ -1,7 +1,7 @@ img->SetMargin(40, 40, 40, 40); $graph->SetShadow(); - -$graph->title->Set('A simple scatter plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'A simple scatter plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $sp1->mark->SetFillColor('red'); $sp1->mark->SetWidth(8); diff --git a/Examples/examples_scatter/scatterlinkex1.php b/Examples/examples_scatter/scatterlinkex1.php old mode 100755 new mode 100644 index 1fdb6465..24fa56ba --- a/Examples/examples_scatter/scatterlinkex1.php +++ b/Examples/examples_scatter/scatterlinkex1.php @@ -1,7 +1,7 @@ img->SetAntiAliasing(); $graph->SetScale('linlin'); $graph->SetShadow(); -$graph->title->Set('Linked Scatter plot ex1'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Linked Scatter plot ex1'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $sp1 = new Plot\ScatterPlot($datay, $datax); $sp1->SetLinkPoints(true, 'red', 2); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $sp1->mark->SetFillColor('navy'); $sp1->mark->SetWidth(3); diff --git a/Examples/examples_scatter/scatterlinkex2.php b/Examples/examples_scatter/scatterlinkex2.php old mode 100755 new mode 100644 index 7f7b08f3..0dc2d274 --- a/Examples/examples_scatter/scatterlinkex2.php +++ b/Examples/examples_scatter/scatterlinkex2.php @@ -1,7 +1,7 @@ img->SetMargin(40, 40, 40, 40); $graph->SetShadow(); -$graph->title->Set('Linked scatter plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'Linked scatter plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // 10% top and bottom grace $graph->yscale->SetGrace(5, 5); $graph->xscale->SetGrace(1, 1); $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $sp1->mark->SetFillColor('red'); $sp1->SetColor('blue'); diff --git a/Examples/examples_scatter/scatterlinkex3.php b/Examples/examples_scatter/scatterlinkex3.php old mode 100755 new mode 100644 index a1c66685..89e36b06 --- a/Examples/examples_scatter/scatterlinkex3.php +++ b/Examples/examples_scatter/scatterlinkex3.php @@ -1,7 +1,7 @@ SetScale('linlin'); $graph->SetShadow(); -$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->SetAxisStyle(Graph\Configs::getConfig('AXSTYLE_BOXOUT')); $graph->img->SetMargin(50, 50, 60, 40); - -$graph->title->Set('Linked scatter plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->subtitle->Set('(BOXOUT Axis style)'); -$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$example_title = 'Linked scatter plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$subtitle_text = 'BOXOUT Axis style)'; +$graph->subtitle->Set($subtitle_text); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_NORMAL')); // 10% top and bottom grace $graph->yscale->SetGrace(5, 5); $graph->xscale->SetGrace(1, 1); $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $sp1->mark->SetFillColor('red'); $sp1->SetColor('blue'); diff --git a/Examples/examples_scatter/scatterlinkex4.php b/Examples/examples_scatter/scatterlinkex4.php old mode 100755 new mode 100644 index 3fbb259d..94eb5fe2 --- a/Examples/examples_scatter/scatterlinkex4.php +++ b/Examples/examples_scatter/scatterlinkex4.php @@ -1,7 +1,7 @@ SetScale('linlin'); $graph->SetShadow(); -$graph->SetAxisStyle(AXSTYLE_BOXIN); +$graph->SetAxisStyle(Graph\Configs::getConfig('AXSTYLE_BOXIN')); $graph->img->SetMargin(50, 50, 60, 40); - -$graph->title->Set('Linked scatter plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); -$graph->subtitle->Set('(BOXIN Axis style)'); -$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL); +$example_title = 'Linked scatter plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); +$subtitle_text = 'BOXIN Axis style)'; +$graph->subtitle->Set($subtitle_text); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_NORMAL')); // 10% top and bottom grace $graph->yscale->SetGrace(5, 5); $graph->xscale->SetGrace(1, 1); $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $sp1->mark->SetFillColor('red'); $sp1->SetColor('blue'); diff --git a/Examples/examples_scatter/scatterrotex1.php b/Examples/examples_scatter/scatterrotex1.php old mode 100755 new mode 100644 index 29674370..000362f4 --- a/Examples/examples_scatter/scatterrotex1.php +++ b/Examples/examples_scatter/scatterrotex1.php @@ -1,7 +1,7 @@ Set90AndMargin(40, 40, 40, 40); $graph->SetShadow(); - -$graph->title->Set('A 90 degrees rotated scatter plot'); -$graph->title->SetFont(FF_FONT1, FS_BOLD); +$example_title = 'A 90 degrees rotated scatter plot'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); // Adjust the label align for X-axis so they look good rotated $graph->xaxis->SetLabelAlign('right', 'center', 'right'); @@ -33,7 +33,7 @@ $graph->xaxis->title->SetMargin(15); $sp1 = new Plot\ScatterPlot($datay, $datax); -$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetType(Graph\Configs::getConfig('MARK_FILLEDCIRCLE')); $sp1->mark->SetFillColor('red'); $sp1->mark->SetWidth(5); diff --git a/Examples/examples_staticband/smallstaticbandsex1.php b/Examples/examples_staticband/smallstaticbandsex1.php old mode 100755 new mode 100644 index 87f12f68..43a18a60 --- a/Examples/examples_staticband/smallstaticbandsex1.php +++ b/Examples/examples_staticband/smallstaticbandsex1.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_RDIAG'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_RDIAG'); +$example_title = 'BAND_RDIAG'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex10.php b/Examples/examples_staticband/smallstaticbandsex10.php old mode 100755 new mode 100644 index d1416265..66a53d36 --- a/Examples/examples_staticband/smallstaticbandsex10.php +++ b/Examples/examples_staticband/smallstaticbandsex10.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_DIAGCROSS, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_DIAGCROSS'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_DIAGCROSS'); +$example_title = 'BAND_DIAGCROSS'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex11.php b/Examples/examples_staticband/smallstaticbandsex11.php old mode 100755 new mode 100644 index d1416265..66a53d36 --- a/Examples/examples_staticband/smallstaticbandsex11.php +++ b/Examples/examples_staticband/smallstaticbandsex11.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_DIAGCROSS, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_DIAGCROSS'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_DIAGCROSS'); +$example_title = 'BAND_DIAGCROSS'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex2.php b/Examples/examples_staticband/smallstaticbandsex2.php old mode 100755 new mode 100644 index caeacfcf..f2684a63 --- a/Examples/examples_staticband/smallstaticbandsex2.php +++ b/Examples/examples_staticband/smallstaticbandsex2.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_LDIAG'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_LDIAG'); +$example_title = 'BAND_LDIAG'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex3.php b/Examples/examples_staticband/smallstaticbandsex3.php old mode 100755 new mode 100644 index b21c9785..7b9c6736 --- a/Examples/examples_staticband/smallstaticbandsex3.php +++ b/Examples/examples_staticband/smallstaticbandsex3.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_SOLID, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_SOLID'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_SOLID'); +$example_title = 'BAND_SOLID'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex4.php b/Examples/examples_staticband/smallstaticbandsex4.php old mode 100755 new mode 100644 index 7f1605fd..f6ba8209 --- a/Examples/examples_staticband/smallstaticbandsex4.php +++ b/Examples/examples_staticband/smallstaticbandsex4.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_3DPLANE'), 15, 35, 'khaki4'); $band->SetDensity(80); $band->ShowFrame(true); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_3DPLANE, Density=60'); +$example_title = 'BAND_3DPLANE, Density=60'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex5.php b/Examples/examples_staticband/smallstaticbandsex5.php old mode 100755 new mode 100644 index 5e48653a..cb839d2f --- a/Examples/examples_staticband/smallstaticbandsex5.php +++ b/Examples/examples_staticband/smallstaticbandsex5.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_HVCROSS, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_HVCROSS'), 15, 35, 'khaki4'); $band->ShowFrame(true); -$band->SetOrder(DEPTH_FRONT); +$band->SetOrder(Graph\Configs::getConfig('DEPTH_FRONT')); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_HVCROSS, In front'); +$example_title = 'BAND_HVCROSS, In front'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex6.php b/Examples/examples_staticband/smallstaticbandsex6.php old mode 100755 new mode 100644 index 4b93452b..3625adc7 --- a/Examples/examples_staticband/smallstaticbandsex6.php +++ b/Examples/examples_staticband/smallstaticbandsex6.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_VLINE, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_VLINE'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_VLINE'); +$example_title = 'BAND_VLINE'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex7.php b/Examples/examples_staticband/smallstaticbandsex7.php old mode 100755 new mode 100644 index b718e0f0..fb39dd78 --- a/Examples/examples_staticband/smallstaticbandsex7.php +++ b/Examples/examples_staticband/smallstaticbandsex7.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_HLINE, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_HLINE'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_HLINE'); +$example_title = 'BAND_HLINE'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex8.php b/Examples/examples_staticband/smallstaticbandsex8.php old mode 100755 new mode 100644 index 386087bf..d0294f4d --- a/Examples/examples_staticband/smallstaticbandsex8.php +++ b/Examples/examples_staticband/smallstaticbandsex8.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_3DPLANE'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_3DPLANE'); +$example_title = 'BAND_3DPLANE'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/smallstaticbandsex9.php b/Examples/examples_staticband/smallstaticbandsex9.php old mode 100755 new mode 100644 index 07a20579..7079cf69 --- a/Examples/examples_staticband/smallstaticbandsex9.php +++ b/Examples/examples_staticband/smallstaticbandsex9.php @@ -1,7 +1,7 @@ Add($bplot); // Add band -$band = new Plot\PlotBand(HORIZONTAL, BAND_HVCROSS, 15, 35, 'khaki4'); +$band = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_HVCROSS'), 15, 35, 'khaki4'); $band->ShowFrame(false); $graph->Add($band); // Set title -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $graph->title->SetColor('darkred'); -$graph->title->Set('BAND_HVCROSS'); +$example_title = 'BAND_HVCROSS'; +$graph->title->set($example_title); $graph->Stroke(); diff --git a/Examples/examples_staticband/staticbandbarex1.php b/Examples/examples_staticband/staticbandbarex1.php old mode 100755 new mode 100644 index 37582557..20728da3 --- a/Examples/examples_staticband/staticbandbarex1.php +++ b/Examples/examples_staticband/staticbandbarex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetShadow(); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); -$graph->title->Set('Cash flow '); -$graph->subtitle->Set('(Department X)'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 15); +$example_title = 'Cash flow '; +$graph->title->set($example_title); +$subtitle_text = '(Department X)'; +$graph->subtitle->Set($subtitle_text); // Show both X and Y grid $graph->xgrid->Show(true, false); @@ -29,8 +31,8 @@ $graph->yscale->SetGrace(10, 10); // Turn the tick mark out from the plot area -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Create a bar pot $bplot = new Plot\BarPlot($datay); @@ -47,13 +49,13 @@ $graph->Add($bplot); // Add band -$graph->Add(new Plot\PlotBand(HORIZONTAL, BAND_HLINE, 0, 10)); +$graph->Add(new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_HLINE'), 0, 10)); //$graph->title->Set("Test of bar gradient fill"); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $graph->Stroke(); diff --git a/Examples/examples_staticband/staticbandbarex2.php b/Examples/examples_staticband/staticbandbarex2.php old mode 100755 new mode 100644 index 5d1091b7..8f51f5d7 --- a/Examples/examples_staticband/staticbandbarex2.php +++ b/Examples/examples_staticband/staticbandbarex2.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetShadow(); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); -$graph->title->Set('Cash flow '); -$graph->subtitle->Set('(Department X)'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 15); +$example_title = 'Cash flow '; +$graph->title->set($example_title); +$subtitle_text = '(Department X)'; +$graph->subtitle->Set($subtitle_text); // Show both X and Y grid $graph->xgrid->Show(true, false); @@ -29,8 +31,8 @@ $graph->yscale->SetGrace(10, 10); // Turn the tick mark out from the plot area -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Create a bar pot $bplot = new Plot\BarPlot($datay); @@ -47,13 +49,13 @@ $graph->Add($bplot); // Add band -$graph->Add(new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 0, 'max', 'red', 2)); +$graph->Add(new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_RDIAG'), 0, 'max', 'red', 2)); //$graph->title->Set("Test of bar gradient fill"); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $graph->Stroke(); diff --git a/Examples/examples_staticband/staticbandbarex3.php b/Examples/examples_staticband/staticbandbarex3.php old mode 100755 new mode 100644 index dcaff318..36c55ebf --- a/Examples/examples_staticband/staticbandbarex3.php +++ b/Examples/examples_staticband/staticbandbarex3.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetShadow(); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); -$graph->title->Set('Cash flow '); -$graph->subtitle->Set('(Department X)'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 15); +$example_title = 'Cash flow '; +$graph->title->set($example_title); +$subtitle_text = '(Department X)'; +$graph->subtitle->Set($subtitle_text); // Show both X and Y grid $graph->xgrid->Show(true, false); @@ -29,8 +31,8 @@ $graph->yscale->SetGrace(10, 10); // Turn the tick mark out from the plot area -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Create a bar pot $bplot = new Plot\BarPlot($datay); @@ -47,9 +49,9 @@ $graph->Add($bplot); // Add upper and lower band and use no frames -$uband = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 0, 'max', 'green'); +$uband = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_RDIAG'), 0, 'max', 'green'); $uband->ShowFrame(false); -$lband = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, 'min', 0, 'red'); +$lband = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_LDIAG'), 'min', 0, 'red'); $lband->ShowFrame(false); $graph->Add($uband); @@ -59,7 +61,7 @@ $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $graph->Stroke(); diff --git a/Examples/examples_staticband/staticbandbarex4.php b/Examples/examples_staticband/staticbandbarex4.php old mode 100755 new mode 100644 index 283f9019..139acc69 --- a/Examples/examples_staticband/staticbandbarex4.php +++ b/Examples/examples_staticband/staticbandbarex4.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetShadow(); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); -$graph->title->Set('Cash flow '); -$graph->subtitle->Set('(Department X)'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 15); +$example_title = 'Cash flow '; +$graph->title->set($example_title); +$subtitle_text = '(Department X)'; +$graph->subtitle->Set($subtitle_text); // Show both X and Y grid $graph->xgrid->Show(true, false); @@ -29,8 +31,8 @@ $graph->yscale->SetGrace(10, 10); // Turn the tick mark out from the plot area -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Create a bar pot $bplot = new Plot\BarPlot($datay); @@ -47,10 +49,10 @@ $graph->Add($bplot); // Add upper and lower band and use no frames -$uband = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 0, 'max', 'green'); +$uband = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_RDIAG'), 0, 'max', 'green'); $uband->ShowFrame(false); $uband->SetDensity(50); // 50% line density -$lband = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, 'min', 0, 'red'); +$lband = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_LDIAG'), 'min', 0, 'red'); $lband->ShowFrame(false); $lband->SetDensity(20); // 20% line density @@ -61,7 +63,7 @@ $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $graph->Stroke(); diff --git a/Examples/examples_staticband/staticbandbarex5.php b/Examples/examples_staticband/staticbandbarex5.php old mode 100755 new mode 100644 index dadb7e74..8a23c0bf --- a/Examples/examples_staticband/staticbandbarex5.php +++ b/Examples/examples_staticband/staticbandbarex5.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetShadow(); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); -$graph->title->Set('Cash flow '); -$graph->subtitle->Set('(Department X)'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 15); +$example_title = 'Cash flow '; +$graph->title->set($example_title); +$subtitle_text = '(Department X)'; +$graph->subtitle->Set($subtitle_text); // Show both X and Y grid $graph->xgrid->Show(true, false); @@ -29,8 +31,8 @@ $graph->yscale->SetGrace(10, 10); // Turn the tick mark out from the plot area -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Create a bar pot $bplot = new Plot\BarPlot($datay); @@ -47,13 +49,13 @@ $graph->Add($bplot); // Add upper and lower band and use no frames -$band[0] = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 10, 20, 'green'); +$band[0] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_RDIAG'), 10, 20, 'green'); $band[0]->ShowFrame(false); $band[0]->SetDensity(30); -$band[1] = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, -20, -10, 'red'); +$band[1] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_LDIAG'), -20, -10, 'red'); $band[1]->ShowFrame(false); $band[1]->SetDensity(40); -$band[2] = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, 'min', -20, 'red'); +$band[2] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_LDIAG'), 'min', -20, 'red'); $band[2]->ShowFrame(false); $band[2]->SetDensity(80); @@ -64,7 +66,7 @@ $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $graph->Stroke(); diff --git a/Examples/examples_staticband/staticbandbarex6.php b/Examples/examples_staticband/staticbandbarex6.php old mode 100755 new mode 100644 index 698a2f39..2e23f7e7 --- a/Examples/examples_staticband/staticbandbarex6.php +++ b/Examples/examples_staticband/staticbandbarex6.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetShadow(); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); -$graph->title->Set('Cash flow '); -$graph->subtitle->Set('Shows some possible patterns for bands'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 15); +$example_title = 'Cash flow '; +$graph->title->set($example_title); +$subtitle_text = 'Shows some possible patterns for bands'; +$graph->subtitle->Set($subtitle_text); // Show both X and Y grid $graph->xgrid->Show(true, false); @@ -29,8 +31,8 @@ $graph->yscale->SetGrace(10, 10); // Turn the tick mark out from the plot area -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Create a bar pot $bplot = new Plot\BarPlot($datay); @@ -48,32 +50,32 @@ $graph->Add($bplot); // Add upper and lower band and use no frames -$band[0] = new Plot\PlotBand(HORIZONTAL, BAND_RDIAG, 10, 20, 'green'); +$band[0] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_RDIAG'), 10, 20, 'green'); $band[0]->ShowFrame(false); -$band[1] = new Plot\PlotBand(HORIZONTAL, BAND_LDIAG, -20, -10, 'red'); +$band[1] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_LDIAG'), -20, -10, 'red'); $band[1]->ShowFrame(false); $band[1]->SetDensity(20); -$band[2] = new Plot\PlotBand(HORIZONTAL, BAND_DIAGCROSS, 'min', -20, 'red'); +$band[2] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_DIAGCROSS'), 'min', -20, 'red'); $band[2]->ShowFrame(false); $band[2]->SetDensity(40); -$band[3] = new Plot\PlotBand(VERTICAL, BAND_HLINE, 0, 1, 'darkgray'); +$band[3] = new Plot\PlotBand(Graph\Configs::getConfig('VERTICAL'), Graph\Configs::getConfig('BAND_HLINE'), 0, 1, 'darkgray'); $band[3]->ShowFrame(false); -$band[3]->SetOrder(DEPTH_FRONT); -$band[4] = new Plot\PlotBand(VERTICAL, BAND_HVCROSS, 5, 'max', 'darkgray'); +$band[3]->SetOrder(Graph\Configs::getConfig('DEPTH_FRONT')); +$band[4] = new Plot\PlotBand(Graph\Configs::getConfig('VERTICAL'), Graph\Configs::getConfig('BAND_HVCROSS'), 5, 'max', 'darkgray'); $band[4]->ShowFrame(false); -$band[4]->SetOrder(DEPTH_FRONT); -$band[5] = new Plot\PlotBand(HORIZONTAL, BAND_SOLID, 20, 'max', 'lightgreen'); -$band[6] = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, -10, 0, 'blue'); +$band[4]->SetOrder(Graph\Configs::getConfig('DEPTH_FRONT')); +$band[5] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_SOLID'), 20, 'max', 'lightgreen'); +$band[6] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_3DPLANE'), -10, 0, 'blue'); $band[6]->SetDensity(70); $graph->Add($band); -$graph->AddLine(new Plot\PlotLine(HORIZONTAL, 0, 'black', 2)); +$graph->AddLine(new Plot\PlotLine(Graph\Configs::getConfig('HORIZONTAL'), 0, 'black', 2)); //$graph->title->Set("Test of bar gradient fill"); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $graph->Stroke(); diff --git a/Examples/examples_staticband/staticbandbarex7.php b/Examples/examples_staticband/staticbandbarex7.php old mode 100755 new mode 100644 index 4fec43c3..e368edef --- a/Examples/examples_staticband/staticbandbarex7.php +++ b/Examples/examples_staticband/staticbandbarex7.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetShadow(); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 15); -$graph->title->Set('Cash flow '); -$graph->subtitle->Set('Use of static line, 3D and solid band'); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 15); +$example_title = 'Cash flow '; +$graph->title->set($example_title); +$subtitle_text = 'Use of static line, 3D and solid band'; +$graph->subtitle->Set($subtitle_text); // Turn off Y-grid (it's on by default) $graph->ygrid->Show(false); @@ -30,8 +32,8 @@ $graph->yscale->SetAutoMin(-20); // Turn the tick mark out from the plot area -$graph->xaxis->SetTickSide(SIDE_DOWN); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Create a bar pot $bplot = new Plot\BarPlot($datay); @@ -49,20 +51,20 @@ $graph->Add($bplot); // Add upper and lower band and use no frames -$band[0] = new Plot\PlotBand(HORIZONTAL, BAND_3DPLANE, 'min', 0, 'blue'); +$band[0] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_3DPLANE'), 'min', 0, 'blue'); $band[0]->ShowFrame(false); $band[0]->SetDensity(20); -$band[1] = new Plot\PlotBand(HORIZONTAL, BAND_SOLID, 0, 'max', 'steelblue'); +$band[1] = new Plot\PlotBand(Graph\Configs::getConfig('HORIZONTAL'), Graph\Configs::getConfig('BAND_SOLID'), 0, 'max', 'steelblue'); $band[1]->ShowFrame(false); $graph->Add($band); -$graph->Add(new Plot\PlotLine(HORIZONTAL, 0, 'black', 2)); +$graph->Add(new Plot\PlotLine(Graph\Configs::getConfig('HORIZONTAL'), 0, 'black', 2)); //$graph->title->Set("Test of bar gradient fill"); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); -$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 11); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$graph->xaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $graph->Stroke(); diff --git a/Examples/examples_stock/no_test_boxstockex1.php b/Examples/examples_stock/no_test_boxstockex1.php old mode 100755 new mode 100644 index a5add37c..9b269c69 --- a/Examples/examples_stock/no_test_boxstockex1.php +++ b/Examples/examples_stock/no_test_boxstockex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetMarginColor('lightblue'); -$graph->title->Set('Box Stock chart example'); +$example_title = 'Box Stock chart example'; +$graph->title->set($example_title); // Create a new stock plot $p1 = new BoxPlot($datay); diff --git a/Examples/examples_stock/no_test_boxstockex2.php b/Examples/examples_stock/no_test_boxstockex2.php old mode 100755 new mode 100644 index c31ee29c..e6da661d --- a/Examples/examples_stock/no_test_boxstockex2.php +++ b/Examples/examples_stock/no_test_boxstockex2.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetMarginColor('lightblue'); -$graph->title->Set('Box Stock chart example'); -$graph->subtitle->Set('(Indented X-axis)'); +$example_title = 'Box Stock chart example'; +$graph->title->set($example_title); +$subtitle_text = '(Indented X-axis)'; +$graph->subtitle->Set($subtitle_text); // Create a new stock plot $p1 = new BoxPlot($datay); diff --git a/Examples/examples_stock/no_test_stockex1.php b/Examples/examples_stock/no_test_stockex1.php old mode 100755 new mode 100644 index 23e04246..4ced2d83 --- a/Examples/examples_stock/no_test_stockex1.php +++ b/Examples/examples_stock/no_test_stockex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetMarginColor('lightblue'); -$graph->title->Set('Stockchart example'); +$example_title = 'Stockchart example'; +$graph->title->set($example_title); // Create a new stock plot $p1 = new StockPlot($datay); diff --git a/Examples/examples_stock/no_test_stockex2.php b/Examples/examples_stock/no_test_stockex2.php old mode 100755 new mode 100644 index 11ddaf34..43151bca --- a/Examples/examples_stock/no_test_stockex2.php +++ b/Examples/examples_stock/no_test_stockex2.php @@ -1,7 +1,7 @@ SetBox(); $graph->tabtitle->Set(' Week 34 '); -$graph->tabtitle->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->tabtitle->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // Get week days in curent locale $days = $graph->gDateLocale->GetShortDay(); diff --git a/Examples/examples_sunspot/no_test_sunspotsex1.php b/Examples/examples_sunspot/no_test_sunspotsex1.php old mode 100755 new mode 100644 index 3a82bc28..19cba8d8 --- a/Examples/examples_sunspot/no_test_sunspotsex1.php +++ b/Examples/examples_sunspot/no_test_sunspotsex1.php @@ -1,7 +1,7 @@ SetScale('intint'); -// Setup a title for the graph -$graph->title->Set('Sunspot example'); +// Setup a title for the graph$example_title='Sunspot example'; $graph->title->set($example_title); // Setup titles and X-axis labels $graph->xaxis->title->Set('(year from 1701)'); diff --git a/Examples/examples_sunspot/no_test_sunspotsex2.php b/Examples/examples_sunspot/no_test_sunspotsex2.php old mode 100755 new mode 100644 index c8b8b0a7..8b1ecdfa --- a/Examples/examples_sunspot/no_test_sunspotsex2.php +++ b/Examples/examples_sunspot/no_test_sunspotsex2.php @@ -1,7 +1,7 @@ SetScale('intint'); -// Setup a title for the graph -$graph->title->Set('Sunspot example'); +// Setup a title for the graph$example_title='Sunspot example'; $graph->title->set($example_title); // Setup titles and X-axis labels $graph->xaxis->title->Set('(year from 1701)'); diff --git a/Examples/examples_sunspot/no_test_sunspotsex3.php b/Examples/examples_sunspot/no_test_sunspotsex3.php old mode 100755 new mode 100644 index 6f754b4a..6023288c --- a/Examples/examples_sunspot/no_test_sunspotsex3.php +++ b/Examples/examples_sunspot/no_test_sunspotsex3.php @@ -1,7 +1,7 @@ SetScale('intint'); -// Setup a title for the graph -$graph->title->Set('Sunspot example'); +// Setup a title for the graph$example_title='Sunspot example'; $graph->title->set($example_title); // Setup titles and X-axis labels $graph->xaxis->title->Set('(year from 1701)'); diff --git a/Examples/examples_sunspot/no_test_sunspotsex4.php b/Examples/examples_sunspot/no_test_sunspotsex4.php old mode 100755 new mode 100644 index d424b825..311c1b84 --- a/Examples/examples_sunspot/no_test_sunspotsex4.php +++ b/Examples/examples_sunspot/no_test_sunspotsex4.php @@ -1,7 +1,7 @@ SetScale('intint', 0, 0, 0, max($year) - min($year) + 1); -// Setup a title for the graph -$graph->title->Set('Sunspot example'); +// Setup a title for the graph$example_title='Sunspot example'; $graph->title->set($example_title); // Setup titles and X-axis labels $graph->xaxis->title->Set('(year from 1701)'); diff --git a/Examples/examples_sunspot/no_test_sunspotsex5.php b/Examples/examples_sunspot/no_test_sunspotsex5.php old mode 100755 new mode 100644 index e29778e9..d5244078 --- a/Examples/examples_sunspot/no_test_sunspotsex5.php +++ b/Examples/examples_sunspot/no_test_sunspotsex5.php @@ -1,7 +1,7 @@ SetScale('intint'); -// Setup a title for the graph -$graph->title->Set('Sunspot example'); +// Setup a title for the graph$example_title='Sunspot example'; $graph->title->set($example_title); // Setup titles and X-axis labels $graph->xaxis->title->Set('(year from 1701)'); diff --git a/Examples/examples_sunspot/no_test_sunspotsex6.php b/Examples/examples_sunspot/no_test_sunspotsex6.php old mode 100755 new mode 100644 index 170ae416..56266123 --- a/Examples/examples_sunspot/no_test_sunspotsex6.php +++ b/Examples/examples_sunspot/no_test_sunspotsex6.php @@ -1,7 +1,7 @@ SetScale('intint'); -// Setup a title for the graph -$graph->title->Set('Sunspot example'); +// Setup a title for the graph$example_title='Sunspot example'; $graph->title->set($example_title); // Setup titles and X-axis labels $graph->xaxis->title->Set('(year from 1701)'); diff --git a/Examples/examples_sunspot/no_test_sunspotsex7.php b/Examples/examples_sunspot/no_test_sunspotsex7.php old mode 100755 new mode 100644 index 440e5228..586c3848 --- a/Examples/examples_sunspot/no_test_sunspotsex7.php +++ b/Examples/examples_sunspot/no_test_sunspotsex7.php @@ -1,7 +1,7 @@ SetScale('textint'); -// Setup a title for the graph -$graph->title->Set('Sunspot example'); +// Setup a title for the graph$example_title='Sunspot example'; $graph->title->set($example_title); // Setup titles and X-axis labels $graph->xaxis->title->Set('(year)'); diff --git a/Examples/examples_tables/no_test_table_flagex1.php b/Examples/examples_tables/no_test_table_flagex1.php old mode 100755 new mode 100644 index 1c4f7377..900d051f --- a/Examples/examples_tables/no_test_table_flagex1.php +++ b/Examples/examples_tables/no_test_table_flagex1.php @@ -1,7 +1,7 @@ Set($data); -$table->SetFont(FF_TIMES, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Adjust the font for row 0 and 6 -$table->SetColFont(0, FF_ARIAL, FS_BOLD, 11); -$table->SetRowFont(6, FF_TIMES, FS_BOLD, 12); +$table->SetColFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$table->SetRowFont(6, Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_BOLD'), 12); // Set the minimum heigth/width $table->SetMinRowHeight(2, 10); @@ -42,11 +42,11 @@ // Add some padding (in pixels) $table->SetRowPadding(2, 0); -$table->SetRowGrid(6, 1, 'darkgray', TGRID_DOUBLE2); +$table->SetRowGrid(6, 1, 'darkgray', Graph\Configs::getConfig('TGRID_DOUBLE2')); // Setup the grid $table->SetGrid(0); -$table->SetRowGrid(6, 1, 'black', TGRID_DOUBLE2); +$table->SetRowGrid(6, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE2')); // Merge all cells in row 0 $table->MergeRow(0); @@ -64,7 +64,7 @@ $n = count($countries); for ($i = 0; $i < $n; ++$i) { $table->SetCellCountryFlag(1, $i + 1, $countries[$i], 0.5); - $table->SetCellImageConstrain(1, $i + 1, TIMG_HEIGHT, 20); + $table->SetCellImageConstrain(1, $i + 1, Graph\Configs::getConfig('TIMG_HEIGHT'), 20); } // Add the table to the graph diff --git a/Examples/examples_tables/no_test_table_howto1.php b/Examples/examples_tables/no_test_table_howto1.php old mode 100755 new mode 100644 index 46eda972..d2ecbc78 --- a/Examples/examples_tables/no_test_table_howto1.php +++ b/Examples/examples_tables/no_test_table_howto1.php @@ -1,7 +1,7 @@ MergeRow(0); // Adjust font in cell (0,0) -$table->SetCellFont(0, 0, FF_ARIAL, FS_BOLD, 14); +$table->SetCellFont(0, 0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); // Set left align for all cells in rectangle (0,0) - (0,3) $table->SetAlign(0, 0, 0, 3, 'Left'); diff --git a/Examples/examples_tables/no_test_table_howto6.php b/Examples/examples_tables/no_test_table_howto6.php old mode 100755 new mode 100644 index 96aa472e..51c51cdf --- a/Examples/examples_tables/no_test_table_howto6.php +++ b/Examples/examples_tables/no_test_table_howto6.php @@ -1,7 +1,7 @@ MergeRow(0); // Setup font and color -$table->SetCellFont(0, 0, FF_ARIAL, FS_BOLD, 14); +$table->SetCellFont(0, 0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); $table->SetRowFillColor(0, 'orange@0.5'); $table->SetRowColor(0, 'darkred'); diff --git a/Examples/examples_tables/no_test_table_howto7.1.php b/Examples/examples_tables/no_test_table_howto7.1.php old mode 100755 new mode 100644 index b600ae22..46730029 --- a/Examples/examples_tables/no_test_table_howto7.1.php +++ b/Examples/examples_tables/no_test_table_howto7.1.php @@ -1,7 +1,7 @@ Set($data); // Set default font in entire table -$table->SetFont(FF_ARIAL, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Setup font and color for row = 2 -$table->SetRowFont(2, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(2, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetRowFillColor(2, 'orange@0.5'); // Setup minimum color width $table->SetMinColWidth(35); // Setup grid on row 2 -$table->SetRowGrid(2, 1, 'black', TGRID_DOUBLE); +$table->SetRowGrid(2, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE')); // Add table to the graph $graph->Add($table); diff --git a/Examples/examples_tables/no_test_table_howto7.2.php b/Examples/examples_tables/no_test_table_howto7.2.php old mode 100755 new mode 100644 index 0bd9a492..404081ad --- a/Examples/examples_tables/no_test_table_howto7.2.php +++ b/Examples/examples_tables/no_test_table_howto7.2.php @@ -1,7 +1,7 @@ Set($data); // Set default font in entire table -$table->SetFont(FF_ARIAL, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Setup font and color for row = 2 -$table->SetRowFont(2, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(2, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetRowFillColor(2, 'orange@0.5'); // Setup minimum color width $table->SetMinColWidth(35); // Setup grid on row 2 -$table->SetRowGrid(2, 1, 'black', TGRID_DOUBLE2); +$table->SetRowGrid(2, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE2')); // Add table to the graph $graph->Add($table); diff --git a/Examples/examples_tables/no_test_table_howto7.php b/Examples/examples_tables/no_test_table_howto7.php old mode 100755 new mode 100644 index 0bd9a492..404081ad --- a/Examples/examples_tables/no_test_table_howto7.php +++ b/Examples/examples_tables/no_test_table_howto7.php @@ -1,7 +1,7 @@ Set($data); // Set default font in entire table -$table->SetFont(FF_ARIAL, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Setup font and color for row = 2 -$table->SetRowFont(2, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(2, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetRowFillColor(2, 'orange@0.5'); // Setup minimum color width $table->SetMinColWidth(35); // Setup grid on row 2 -$table->SetRowGrid(2, 1, 'black', TGRID_DOUBLE2); +$table->SetRowGrid(2, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE2')); // Add table to the graph $graph->Add($table); diff --git a/Examples/examples_tables/no_test_table_howto8.php b/Examples/examples_tables/no_test_table_howto8.php old mode 100755 new mode 100644 index 7265956b..e10cc057 --- a/Examples/examples_tables/no_test_table_howto8.php +++ b/Examples/examples_tables/no_test_table_howto8.php @@ -1,7 +1,7 @@ Set($data); // Setup overall table font -$table->SetFont(FF_ARIAL, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Setup font and color for row = 2 -$table->SetRowFont(2, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(2, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetRowFillColor(2, 'orange@0.5'); // Setup minimum color width @@ -38,7 +38,7 @@ $table->setGrid(0, 'black'); // Set specific frid for row = 2 -$table->SetRowGrid(2, 1, 'black', TGRID_DOUBLE2); +$table->SetRowGrid(2, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE2')); // Add the table to the graph $graph->Add($table); diff --git a/Examples/examples_tables/no_test_table_howto9.php b/Examples/examples_tables/no_test_table_howto9.php old mode 100755 new mode 100644 index 2f719099..66fc28b5 --- a/Examples/examples_tables/no_test_table_howto9.php +++ b/Examples/examples_tables/no_test_table_howto9.php @@ -1,7 +1,7 @@ Set($data); // Setup overall table font -$table->SetFont(FF_ARIAL, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Setup font and color for row = 2 -$table->SetRowFont(2, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(2, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetRowFillColor(2, 'orange@0.5'); // Setup minimum color width @@ -38,7 +38,7 @@ $table->setGrid(0, 'black'); // Set specific frid for row = 2 -$table->SetRowGrid(2, 1, 'black', TGRID_DOUBLE2); +$table->SetRowGrid(2, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE2')); // Setup overall number format in all cells $table->SetNumberFormat('%0.1f'); diff --git a/Examples/examples_tables/no_test_table_mex0.php b/Examples/examples_tables/no_test_table_mex0.php old mode 100755 new mode 100644 index 5ed4c5e1..cc4c69b1 --- a/Examples/examples_tables/no_test_table_mex0.php +++ b/Examples/examples_tables/no_test_table_mex0.php @@ -1,7 +1,7 @@ Set($data); // Setup fonts -$table->SetFont(FF_TIMES, FS_NORMAL, 11); -$table->SetColFont(0, FF_ARIAL, FS_NORMAL, 11); -$table->SetRowFont(0, FF_ARIAL, FS_NORMAL, 11); -$table->SetRowFont(4, FF_TIMES, FS_BOLD, 14); +$table->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); +$table->SetColFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); +$table->SetRowFont(4, Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_BOLD'), 14); // Turn off the grid $table->SetGrid(0); diff --git a/Examples/examples_tables/no_test_table_mex00.php b/Examples/examples_tables/no_test_table_mex00.php old mode 100755 new mode 100644 index 5eb298f8..543dee4a --- a/Examples/examples_tables/no_test_table_mex00.php +++ b/Examples/examples_tables/no_test_table_mex00.php @@ -1,7 +1,7 @@ Set($data); -$table->SetFont(FF_TIMES, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Set default table alignment $table->SetAlign('right'); diff --git a/Examples/examples_tables/no_test_table_mex1.php b/Examples/examples_tables/no_test_table_mex1.php old mode 100755 new mode 100644 index 7ddf769c..44316267 --- a/Examples/examples_tables/no_test_table_mex1.php +++ b/Examples/examples_tables/no_test_table_mex1.php @@ -1,7 +1,7 @@ Set($data); -$table->SetFont(FF_ARIAL, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Setup default column width $table->SetMinColWidth(40); @@ -40,17 +40,17 @@ $table->setGrid(0); // Setup font for row 4 and 0 -$table->SetRowFont(4, FF_ARIAL, FS_BOLD, 11); -$table->SetRowFont(0, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(4, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); // Setup color $table->SetRowFillColor(4, 'orange@0.5'); $table->SetFillColor(0, 1, 0, 6, 'teal@0.8'); // Setup grids -$table->SetRowGrid(4, 1, 'black', TGRID_DOUBLE2); -$table->SetColGrid(1, 1, 'black', TGRID_SINGLE); -$table->SetRowGrid(1, 1, 'black', TGRID_SINGLE); +$table->SetRowGrid(4, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE2')); +$table->SetColGrid(1, 1, 'black', Graph\Configs::getConfig('TGRID_SINGLE')); +$table->SetRowGrid(1, 1, 'black', Graph\Configs::getConfig('TGRID_SINGLE')); // Add table to the graph $graph->Add($table); diff --git a/Examples/examples_tables/no_test_table_mex2.php b/Examples/examples_tables/no_test_table_mex2.php old mode 100755 new mode 100644 index 377bab3a..35840e8b --- a/Examples/examples_tables/no_test_table_mex2.php +++ b/Examples/examples_tables/no_test_table_mex2.php @@ -1,7 +1,7 @@ Set($data); -$table->SetFont(FF_ARIAL, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Set default minimum color width $table->SetMinColWidth(40); @@ -40,13 +40,13 @@ $table->setGrid(0); // Setup font -$table->SetRowFont(4, FF_ARIAL, FS_BOLD, 11); -$table->SetRowFont(0, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(4, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); // Setup various grid lines -$table->SetRowGrid(4, 2, 'black', TGRID_SINGLE); -$table->SetColGrid(1, 3, 'black', TGRID_SINGLE); -$table->SetRowGrid(1, 1, 'black', TGRID_SINGLE); +$table->SetRowGrid(4, 2, 'black', Graph\Configs::getConfig('TGRID_SINGLE')); +$table->SetColGrid(1, 3, 'black', Graph\Configs::getConfig('TGRID_SINGLE')); +$table->SetRowGrid(1, 1, 'black', Graph\Configs::getConfig('TGRID_SINGLE')); // Setup various colors $table->SetFillColor(0, 1, 0, 6, 'black'); diff --git a/Examples/examples_tables/no_test_table_mex3.php b/Examples/examples_tables/no_test_table_mex3.php old mode 100755 new mode 100644 index 7e4fe07f..73893c70 --- a/Examples/examples_tables/no_test_table_mex3.php +++ b/Examples/examples_tables/no_test_table_mex3.php @@ -1,7 +1,7 @@ Set($data); -$table->SetFont(FF_ARIAL, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Set default minimum color width $table->SetMinColWidth(40); @@ -40,14 +40,14 @@ $table->SetBorder(2); // Setup font -$table->SetRowFont(4, FF_ARIAL, FS_BOLD, 11); -$table->SetRowFont(0, FF_ARIAL, FS_BOLD, 11); -$table->SetFont(1, 2, 1, 3, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(4, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); +$table->SetFont(1, 2, 1, 3, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); // Setup grids -$table->SetRowGrid(4, 2, 'black', TGRID_SINGLE); -$table->SetColGrid(1, 1, 'black', TGRID_SINGLE); -$table->SetRowGrid(1, 1, 'black', TGRID_SINGLE); +$table->SetRowGrid(4, 2, 'black', Graph\Configs::getConfig('TGRID_SINGLE')); +$table->SetColGrid(1, 1, 'black', Graph\Configs::getConfig('TGRID_SINGLE')); +$table->SetRowGrid(1, 1, 'black', Graph\Configs::getConfig('TGRID_SINGLE')); // Setup colors $table->SetFillColor(0, 1, 0, 6, 'black'); diff --git a/Examples/examples_tables/no_test_table_vtext.php b/Examples/examples_tables/no_test_table_vtext.php old mode 100755 new mode 100644 index a5a37d2e..fc4401f2 --- a/Examples/examples_tables/no_test_table_vtext.php +++ b/Examples/examples_tables/no_test_table_vtext.php @@ -1,7 +1,7 @@ Set($data); $table->SetAlign('right'); -$table->SetFont(FF_TIMES, FS_NORMAL, 12); -$table->SetCellFont(0, 0, FF_ARIAL, FS_BOLD, 16); +$table->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 12); +$table->SetCellFont(0, 0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); // Rotate the entire table 90 degrees $table->SetTextOrientation(90); diff --git a/Examples/examples_tables/no_test_table_vtext_ex1.php b/Examples/examples_tables/no_test_table_vtext_ex1.php old mode 100755 new mode 100644 index 732e3c00..e5895f7a --- a/Examples/examples_tables/no_test_table_vtext_ex1.php +++ b/Examples/examples_tables/no_test_table_vtext_ex1.php @@ -1,7 +1,7 @@ Set($data); -$table->SetFont(FF_TIMES, FS_NORMAL, 11); +$table->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); // Default table alignment $table->SetAlign('right'); // Adjust font in (0,0) -$table->SetCellFont(0, 0, FF_TIMES, FS_BOLD, 14); +$table->SetCellFont(0, 0, Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_BOLD'), 14); // Rotate all textxs in row 0 $table->SetRowTextOrientation(0, 90); diff --git a/Examples/examples_tables/no_test_tablebarex1.php b/Examples/examples_tables/no_test_tablebarex1.php old mode 100755 new mode 100644 index 31c949d3..bcd562b8 --- a/Examples/examples_tables/no_test_tablebarex1.php +++ b/Examples/examples_tables/no_test_tablebarex1.php @@ -1,7 +1,7 @@ SetScale('textlin'); $graph->SetMarginColor('white'); -// Setup titles and fonts -$graph->title->Set('Bar and table'); -$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 14); +// Setup titles and fonts$example_title='Bar and table'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_NORMAL'), 14); $graph->yaxis->title->Set('Flow'); -$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$graph->yaxis->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $graph->yaxis->title->SetMargin(10); // Create the bars and the accbar plot @@ -57,14 +56,14 @@ $table->SetPos($tablexpos, $tableypos + 1); // Basic table formatting -$table->SetFont(FF_ARIAL, FS_NORMAL, 10); +$table->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $table->SetAlign('right'); $table->SetMinColWidth($cellwidth); $table->SetNumberFormat('%0.1f'); // Format table header row $table->SetRowFillColor(0, 'teal@0.7'); -$table->SetRowFont(0, FF_ARIAL, FS_BOLD, 11); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetRowAlign(0, 'center'); // .. and add it to the graph diff --git a/Examples/examples_tables/no_test_tableex00.php b/Examples/examples_tables/no_test_tableex00.php old mode 100755 new mode 100644 index 6190325e..65af768f --- a/Examples/examples_tables/no_test_tableex00.php +++ b/Examples/examples_tables/no_test_tableex00.php @@ -1,7 +1,7 @@ Init(); $table->Set($data); -$table->SetRowFont(0, FF_FONT1, FS_BOLD); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $table->SetRowColor(0, 'navy'); $table->SetRowFillColor(0, 'lightgray'); -$table->SetColFont(0, FF_FONT1, FS_BOLD); +$table->SetColFont(0, Graph\Configs::getConfig('FF_FONT1'), Graph\Configs::getConfig('FS_BOLD')); $table->SetColColor(0, 'navy'); $table->SetColFillColor(0, 'lightgray'); diff --git a/Examples/examples_tables/no_test_tableex02.php b/Examples/examples_tables/no_test_tableex02.php old mode 100755 new mode 100644 index 66511459..0549ad92 --- a/Examples/examples_tables/no_test_tableex02.php +++ b/Examples/examples_tables/no_test_tableex02.php @@ -1,7 +1,7 @@ Set($data); // Setup row and column headers -$table->SetRowFont(0, FF_TIMES, FS_BOLD, 11); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetRowAlign(0, 'left', 'bottom'); $table->SetRowColor(0, 'navy'); $table->SetRowFillColor(0, 'lightgray'); -$table->SetColFont(0, FF_ARIAL, FS_BOLD, 11); +$table->SetColFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 11); $table->SetColColor(0, 'navy'); $table->SetColFillColor(0, 'lightgray'); diff --git a/Examples/examples_tables/no_test_tableex03.php b/Examples/examples_tables/no_test_tableex03.php old mode 100755 new mode 100644 index 1a595cd7..783e2a36 --- a/Examples/examples_tables/no_test_tableex03.php +++ b/Examples/examples_tables/no_test_tableex03.php @@ -1,7 +1,7 @@ MergeCells(0, 0, 0, 6); -$table->SetRowFont(0, FF_ARIAL, FS_BOLD, 16); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 16); $table->SetRowColor(0, 'navy'); $table->SetRowAlign(0, 'center'); @@ -37,17 +37,17 @@ $table->MergeCells(1, 1, 1, 3); $table->MergeCells(1, 4, 1, 6); $table->SetRowAlign(1, 'center'); -$table->SetRowFont(1, FF_ARIAL, FS_BOLD, 10); +$table->SetRowFont(1, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $table->SetRowColor(1, 'navy'); $table->SetRowFillColor(1, 'lightgray'); $table->SetRowGrid(2, '', 0); // Turn off the gridline just under the top row // Setup row and column headers -$table->SetRowFont(2, FF_ARIAL, FS_NORMAL, 11); +$table->SetRowFont(2, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); $table->SetRowColor(2, 'navy'); $table->SetRowFillColor(2, 'lightgray'); -$table->SetColFont(0, FF_ARIAL, FS_NORMAL, 11); +$table->SetColFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 11); $table->SetColColor(0, 'navy'); $table->SetColFillColor(0, 'lightgray'); diff --git a/Examples/examples_tables/no_test_tableex04.php b/Examples/examples_tables/no_test_tableex04.php old mode 100755 new mode 100644 index c6bafe3f..8a88347f --- a/Examples/examples_tables/no_test_tableex04.php +++ b/Examples/examples_tables/no_test_tableex04.php @@ -1,7 +1,7 @@ SetCellAlign($r - 1, 0, 'right'); // Setup row and column headers -$table->SetRowFont(0, FF_ARIAL, FS_NORMAL, 10); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $table->SetRowColor(0, 'navy'); $table->SetRowFillColor(0, 'lightgray'); -$table->SetColFont(0, FF_ARIAL, FS_NORMAL, 10); +$table->SetColFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $table->SetColColor(0, 'navy'); $table->SetColFillColor(0, 'lightgray'); -$table->SetRowGrid($r - 1, 1, 'black', TGRID_DOUBLE); +$table->SetRowGrid($r - 1, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE')); $graph->Add($table); $graph->Stroke(); diff --git a/Examples/examples_tables/no_test_tableex05.php b/Examples/examples_tables/no_test_tableex05.php old mode 100755 new mode 100644 index 0844666e..18dc841b --- a/Examples/examples_tables/no_test_tableex05.php +++ b/Examples/examples_tables/no_test_tableex05.php @@ -1,7 +1,7 @@ SetCellAlign($r - 1, 0, 'right'); // Setup row and column headers -$table->SetRowFont(0, FF_ARIAL, FS_NORMAL, 10); +$table->SetRowFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $table->SetRowColor(0, 'navy'); $table->SetRowFillColor(0, 'lightgray'); -$table->SetColFont(0, FF_ARIAL, FS_NORMAL, 10); +$table->SetColFont(0, Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $table->SetColColor(0, 'navy'); $table->SetColFillColor(0, 'lightgray'); -$table->SetRowGrid($r - 1, 1, 'black', TGRID_DOUBLE); +$table->SetRowGrid($r - 1, 1, 'black', Graph\Configs::getConfig('TGRID_DOUBLE')); -$table->SetFont(1, 4, 2, 6, FF_TIMES, FS_NORMAL, 18); +$table->SetFont(1, 4, 2, 6, Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 18); $table->SetFillColor(1, 1, 2, 3, 'red'); $table->MergeCol(1); diff --git a/Examples/examples_theme/aqua_example.php b/Examples/examples_theme/aqua_example.php old mode 100755 new mode 100644 index ed0303e8..1a8ddd16 --- a/Examples/examples_theme/aqua_example.php +++ b/Examples/examples_theme/aqua_example.php @@ -1,7 +1,7 @@ Add($gbplot); $graph->Add($plot[4]); -$title = 'AquaTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); +$title = 'AquaTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_theme/no_test_fusion_example.php b/Examples/examples_theme/broken_no_test_fusion_example.php old mode 100755 new mode 100644 similarity index 86% rename from Examples/examples_theme/no_test_fusion_example.php rename to Examples/examples_theme/broken_no_test_fusion_example.php index 00559229..a4902589 --- a/Examples/examples_theme/no_test_fusion_example.php +++ b/Examples/examples_theme/broken_no_test_fusion_example.php @@ -1,14 +1,13 @@ SetTheme(new $theme()); } -$theme_class = new FusionTheme(); +$theme_class = new Themes\FusionTheme(); $graph->SetTheme($theme_class); $plot = []; @@ -54,9 +53,10 @@ $graph->Add($gbplot); $graph->Add($plot[4]); -$title = 'FusionTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); +$title = 'FusionTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_theme/no_test_orange_example.php b/Examples/examples_theme/green_example.php old mode 100755 new mode 100644 similarity index 86% rename from Examples/examples_theme/no_test_orange_example.php rename to Examples/examples_theme/green_example.php index 4a372bd7..16d00b37 --- a/Examples/examples_theme/no_test_orange_example.php +++ b/Examples/examples_theme/green_example.php @@ -1,14 +1,13 @@ SetTheme(new $theme()); } -$theme_class = new OrangeTheme(); +$theme_class = new Themes\GreenTheme(); $graph->SetTheme($theme_class); $plot = []; @@ -55,9 +54,10 @@ $graph->Add($gbplot); $graph->Add($plot[4]); -$title = 'OrangeTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); +$title = 'GreenTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_theme/no_test_softy_example.php b/Examples/examples_theme/no_test_softy_example.php deleted file mode 100755 index c2555d51..00000000 --- a/Examples/examples_theme/no_test_softy_example.php +++ /dev/null @@ -1,65 +0,0 @@ - [0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32], - 1 => [0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94], - 2 => [0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7], - 3 => [0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38], - 4 => [0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7], - 5 => [0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57], - 6 => [0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51], - 7 => [0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47], - 8 => [0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34], -]; - -// Create the graph. These two calls are always required -$__width = 400; -$__height = 300; -$graph = new Graph\Graph($__width, $__height); - -$graph->SetScale('textlin'); -if ($theme) { - $graph->SetTheme(new $theme()); -} -$theme_class = new SoftyTheme(); -$graph->SetTheme($theme_class); - -$plot = []; -// Create the bar plots -for ($i = 0; $i < 4; ++$i) { - $plot[$i] = new Plot\BarPlot($data[$i]); - $plot[$i]->SetLegend('plot' . ($i + 1)); -} -//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); -//$acc1->value->Show(); -$gbplot = new Plot\GroupBarPlot([$plot[2], $plot[1]]); - -for ($i = 4; $i < 8; ++$i) { - $plot[$i] = new Plot\LinePlot($data[$i]); - $plot[$i]->SetLegend('plot' . $i); - $plot[$i]->value->Show(); -} - -$graph->Add($gbplot); -$graph->Add($plot[4]); - -$title = 'SoftyTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); -$graph->xaxis->title->Set('X-title'); -$graph->yaxis->title->Set('Y-title'); - -// Display the graph -$graph->Stroke(); diff --git a/Examples/examples_theme/no_test_universal_example.php b/Examples/examples_theme/no_test_universal_example.php deleted file mode 100755 index 8261a864..00000000 --- a/Examples/examples_theme/no_test_universal_example.php +++ /dev/null @@ -1,65 +0,0 @@ - [0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32], - 1 => [0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94], - 2 => [0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7], - 3 => [0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38], - 4 => [0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7], - 5 => [0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57], - 6 => [0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51], - 7 => [0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47], - 8 => [0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34], -]; - -// Create the graph. These two calls are always required -$__width = 400; -$__height = 300; -$graph = new Graph\Graph($__width, $__height); - -$graph->SetScale('textlin'); -if ($theme) { - $graph->SetTheme(new $theme()); -} -$theme_class = new UniversalTheme(); -$graph->SetTheme($theme_class); - -$plot = []; -// Create the bar plots -for ($i = 0; $i < 4; ++$i) { - $plot[$i] = new Plot\BarPlot($data[$i]); - $plot[$i]->SetLegend('plot' . ($i + 1)); -} -//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); -//$acc1->value->Show(); -$gbplot = new Plot\GroupBarPlot([$plot[2], $plot[1]]); - -for ($i = 4; $i < 8; ++$i) { - $plot[$i] = new Plot\LinePlot($data[$i]); - $plot[$i]->SetLegend('plot' . $i); - $plot[$i]->value->Show(); -} - -$graph->Add($gbplot); -$graph->Add($plot[4]); - -$title = 'UniversalTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); -$graph->xaxis->title->Set('X-title'); -$graph->yaxis->title->Set('Y-title'); - -// Display the graph -$graph->Stroke(); diff --git a/Examples/examples_theme/no_test_vivid_example.php b/Examples/examples_theme/no_test_vivid_example.php deleted file mode 100755 index 362143be..00000000 --- a/Examples/examples_theme/no_test_vivid_example.php +++ /dev/null @@ -1,65 +0,0 @@ - [0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32], - 1 => [0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94], - 2 => [0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7], - 3 => [0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38], - 4 => [0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7], - 5 => [0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57], - 6 => [0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51], - 7 => [0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47], - 8 => [0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34], -]; - -// Create the graph. These two calls are always required -$__width = 400; -$__height = 300; -$graph = new Graph\Graph($__width, $__height); - -$graph->SetScale('textlin'); -if ($theme) { - $graph->SetTheme(new $theme()); -} -$theme_class = new VividTheme(); -$graph->SetTheme($theme_class); - -$plot = []; -// Create the bar plots -for ($i = 0; $i < 4; ++$i) { - $plot[$i] = new Plot\BarPlot($data[$i]); - $plot[$i]->SetLegend('plot' . ($i + 1)); -} -//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); -//$acc1->value->Show(); -$gbplot = new Plot\GroupBarPlot([$plot[2], $plot[1]]); - -for ($i = 4; $i < 8; ++$i) { - $plot[$i] = new Plot\LinePlot($data[$i]); - $plot[$i]->SetLegend('plot' . $i); - $plot[$i]->value->Show(); -} - -$graph->Add($gbplot); -$graph->Add($plot[4]); - -$title = 'VividTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); -$graph->xaxis->title->Set('X-title'); -$graph->yaxis->title->Set('Y-title'); - -// Display the graph -$graph->Stroke(); diff --git a/Examples/examples_theme/no_test_ocean_example.php b/Examples/examples_theme/ocean_example.php old mode 100755 new mode 100644 similarity index 86% rename from Examples/examples_theme/no_test_ocean_example.php rename to Examples/examples_theme/ocean_example.php index 35587d9c..c300f154 --- a/Examples/examples_theme/no_test_ocean_example.php +++ b/Examples/examples_theme/ocean_example.php @@ -1,14 +1,13 @@ SetTheme(new $theme()); } -$theme_class = new OceanTheme(); +$theme_class = new Themes\OceanTheme(); $graph->SetTheme($theme_class); $plot = []; @@ -55,9 +54,10 @@ $graph->Add($gbplot); $graph->Add($plot[4]); -$title = 'OceanTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); +$title = 'OceanTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_theme/orange_example.php b/Examples/examples_theme/orange_example.php new file mode 100644 index 00000000..b9429be3 --- /dev/null +++ b/Examples/examples_theme/orange_example.php @@ -0,0 +1,65 @@ + [0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32], + 1 => [0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94], + 2 => [0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7], + 3 => [0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38], + 4 => [0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7], + 5 => [0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57], + 6 => [0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51], + 7 => [0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47], + 8 => [0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34], +]; + +// Create the graph. These two calls are always required +$__width = 400; +$__height = 300; +$graph = new Graph\Graph($__width, $__height); + +$graph->SetScale('textlin'); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new Themes\OrangeTheme(); +$graph->SetTheme($theme_class); + +$plot = []; +// Create the bar plots +for ($i = 0; $i < 4; ++$i) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot([$plot[2], $plot[1]]); + +for ($i = 4; $i < 8; ++$i) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = 'OrangeTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +// Display the graph +$graph->Stroke(); diff --git a/Examples/examples_theme/no_test_pastel_example.php b/Examples/examples_theme/pastel_example.php old mode 100755 new mode 100644 similarity index 86% rename from Examples/examples_theme/no_test_pastel_example.php rename to Examples/examples_theme/pastel_example.php index 81969097..7c7f6174 --- a/Examples/examples_theme/no_test_pastel_example.php +++ b/Examples/examples_theme/pastel_example.php @@ -1,14 +1,13 @@ SetTheme(new $theme()); } -$theme_class = new PastelTheme(); +$theme_class = new Themes\PastelTheme(); $graph->SetTheme($theme_class); $plot = []; @@ -54,9 +53,10 @@ $graph->Add($gbplot); $graph->Add($plot[4]); -$title = 'PastelTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); +$title = 'PastelTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_theme/no_test_rose_example.php b/Examples/examples_theme/rose_example.php old mode 100755 new mode 100644 similarity index 86% rename from Examples/examples_theme/no_test_rose_example.php rename to Examples/examples_theme/rose_example.php index c630d635..53267885 --- a/Examples/examples_theme/no_test_rose_example.php +++ b/Examples/examples_theme/rose_example.php @@ -1,14 +1,13 @@ SetTheme(new $theme()); } -$theme_class = new RoseTheme(); +$theme_class = new Themes\RoseTheme(); $graph->SetTheme($theme_class); $plot = []; @@ -55,9 +54,10 @@ $graph->Add($gbplot); $graph->Add($plot[4]); -$title = 'RoseTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); +$title = 'RoseTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_theme/no_test_green_example.php b/Examples/examples_theme/softy_example.php old mode 100755 new mode 100644 similarity index 86% rename from Examples/examples_theme/no_test_green_example.php rename to Examples/examples_theme/softy_example.php index edf801dd..9566d359 --- a/Examples/examples_theme/no_test_green_example.php +++ b/Examples/examples_theme/softy_example.php @@ -1,14 +1,13 @@ SetTheme(new $theme()); } -$theme_class = new GreenTheme(); +$theme_class = new Themes\SoftyTheme(); $graph->SetTheme($theme_class); $plot = []; @@ -55,9 +54,10 @@ $graph->Add($gbplot); $graph->Add($plot[4]); -$title = 'GreenTheme Example'; -$title = mb_convert_encoding($title, 'UTF-8'); -$graph->title->Set($title); +$title = 'SoftyTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); $graph->xaxis->title->Set('X-title'); $graph->yaxis->title->Set('Y-title'); diff --git a/Examples/examples_theme/no_test_theme_example.php b/Examples/examples_theme/theme_example.php old mode 100755 new mode 100644 similarity index 67% rename from Examples/examples_theme/no_test_theme_example.php rename to Examples/examples_theme/theme_example.php index 0d7e9c5c..2a907ede --- a/Examples/examples_theme/no_test_theme_example.php +++ b/Examples/examples_theme/theme_example.php @@ -1,13 +1,13 @@ SetScale('textlin'); -$theme_class = new AquaTheme(); +$theme_class = new Themes\AquaTheme(); $graph->SetTheme($theme_class); // after setting theme, you can change details as you want $graph->SetFrame(true, 'lightgray'); // set frame visible -$graph->xaxis->SetTickLabels(['A', 'B', 'C', 'D']); // change xaxis lagels -$graph->title->Set('Theme Example'); // add title +$graph->xaxis->SetTickLabels(['A', 'B', 'C', 'D']); // change xaxis lagels$example_title='Theme Example'; $graph->title->set($example_title); // add title // add barplot $bplot = new Plot\BarPlot($data1y); @@ -30,6 +29,6 @@ // you can change properties of the plot only after calling Add() $bplot->SetWeight(0); -$bplot->SetFillGradient('#FFAAAA:0.7', '#FFAAAA:1.2', GRAD_VER); +$bplot->SetFillGradient('#FFAAAA:0.7', '#FFAAAA:1.2', Graph\Configs::getConfig('GRAD_VER')); $graph->Stroke(); diff --git a/Examples/examples_theme/universal_example.php b/Examples/examples_theme/universal_example.php new file mode 100644 index 00000000..012a0d07 --- /dev/null +++ b/Examples/examples_theme/universal_example.php @@ -0,0 +1,65 @@ + [0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32], + 1 => [0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94], + 2 => [0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7], + 3 => [0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38], + 4 => [0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7], + 5 => [0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57], + 6 => [0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51], + 7 => [0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47], + 8 => [0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34], +]; + +// Create the graph. These two calls are always required +$__width = 400; +$__height = 300; +$graph = new Graph\Graph($__width, $__height); + +$graph->SetScale('textlin'); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new Themes\UniversalTheme(); +$graph->SetTheme($theme_class); + +$plot = []; +// Create the bar plots +for ($i = 0; $i < 4; ++$i) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot([$plot[2], $plot[1]]); + +for ($i = 4; $i < 8; ++$i) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = 'UniversalTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +// Display the graph +$graph->Stroke(); diff --git a/Examples/examples_theme/vivid_example.php b/Examples/examples_theme/vivid_example.php new file mode 100644 index 00000000..1180f763 --- /dev/null +++ b/Examples/examples_theme/vivid_example.php @@ -0,0 +1,65 @@ + [0 => 79, 1 => -25, 2 => -7, 3 => 85, 4 => -26, 5 => -32], + 1 => [0 => 76, 1 => 51, 2 => 86, 3 => 12, 4 => -7, 5 => 94], + 2 => [0 => 49, 1 => 38, 2 => 7, 3 => -40, 4 => 9, 5 => -7], + 3 => [0 => 69, 1 => 96, 2 => 49, 3 => 7, 4 => 92, 5 => -38], + 4 => [0 => 68, 1 => 16, 2 => 82, 3 => -49, 4 => 50, 5 => 7], + 5 => [0 => -37, 1 => 28, 2 => 32, 3 => 6, 4 => 13, 5 => 57], + 6 => [0 => 24, 1 => -11, 2 => 7, 3 => 10, 4 => 51, 5 => 51], + 7 => [0 => 3, 1 => -1, 2 => -12, 3 => 61, 4 => 10, 5 => 47], + 8 => [0 => -47, 1 => -21, 2 => 43, 3 => 53, 4 => 36, 5 => 34], +]; + +// Create the graph. These two calls are always required +$__width = 400; +$__height = 300; +$graph = new Graph\Graph($__width, $__height); + +$graph->SetScale('textlin'); +if ($theme) { + $graph->SetTheme(new $theme()); +} +$theme_class = new Themes\VividTheme(); +$graph->SetTheme($theme_class); + +$plot = []; +// Create the bar plots +for ($i = 0; $i < 4; ++$i) { + $plot[$i] = new Plot\BarPlot($data[$i]); + $plot[$i]->SetLegend('plot' . ($i + 1)); +} +//$acc1 = new Plot\AccBarPlot(array($plot[0], $plot[1])); +//$acc1->value->Show(); +$gbplot = new Plot\GroupBarPlot([$plot[2], $plot[1]]); + +for ($i = 4; $i < 8; ++$i) { + $plot[$i] = new Plot\LinePlot($data[$i]); + $plot[$i]->SetLegend('plot' . $i); + $plot[$i]->value->Show(); +} + +$graph->Add($gbplot); +$graph->Add($plot[4]); + +$title = 'VividTheme Example'; +$title = mb_convert_encoding($title, 'UTF-8'); +$example_title = $title; +$graph->title->set($example_title); +$graph->xaxis->title->Set('X-title'); +$graph->yaxis->title->Set('Y-title'); + +// Display the graph +$graph->Stroke(); diff --git a/Examples/examples_tick/manualtickex2.php b/Examples/examples_tick/manualtickex2.php old mode 100755 new mode 100644 index 86bc6ff3..e9ebbb12 --- a/Examples/examples_tick/manualtickex2.php +++ b/Examples/examples_tick/manualtickex2.php @@ -1,7 +1,7 @@ SetScale('linlin', 0, 0, $xmin, $xmax); -$graph->title->Set('Example with manual tick labels'); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$example_title = 'Example with manual tick labels'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // // Make sure that the X-axis is always at the bottom of the scale @@ -62,8 +63,8 @@ $graph->xaxis->SetMajTickPositions($tickPositions, $tickLabels); // Use Times font -$graph->xaxis->SetFont(FF_TIMES, FS_NORMAL, 10); -$graph->yaxis->SetFont(FF_TIMES, FS_NORMAL, 10); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 10); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 10); // Add a X-grid $graph->xgrid->Show(); diff --git a/Examples/examples_tick/manualtickex3.php b/Examples/examples_tick/manualtickex3.php old mode 100755 new mode 100644 index f94d0ad2..6c814da4 --- a/Examples/examples_tick/manualtickex3.php +++ b/Examples/examples_tick/manualtickex3.php @@ -1,7 +1,7 @@ SetScale('linlin', 0, 0, $xmin, $xmax); -$graph->title->Set('Example with manual tick labels'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$example_title = 'Example with manual tick labels'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('white'); // Setup a abackground gradient -$graph->SetBackgroundGradient('darkred:0.7', 'black', 2, BGRAD_MARGIN); +$graph->SetBackgroundGradient('darkred:0.7', 'black', 2, Graph\Configs::getConfig('BGRAD_MARGIN')); $graph->SetPlotGradient('black', 'darkred:0.8', 2); // Make sure that the X-axis is always at the bottom of the scale @@ -65,8 +66,8 @@ $graph->xaxis->SetMajTickPositions($tickPositions, $tickLabels); // Use Times font -$graph->xaxis->SetFont(FF_TIMES, FS_NORMAL, 11); -$graph->yaxis->SetFont(FF_TIMES, FS_NORMAL, 9); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 9); // Set colors for axis $graph->xaxis->SetColor('lightgray'); @@ -76,9 +77,9 @@ $graph->xgrid->Show(); // Show ticks outwards -$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); $graph->xaxis->SetLabelMargin(8); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Setup a filled y-grid //$graph->ygrid->SetFill(true,'darkgray:1.55@0.7','darkgray:1.6@0.7'); diff --git a/Examples/examples_tick/manualtickex4.php b/Examples/examples_tick/manualtickex4.php old mode 100755 new mode 100644 index 3dcf1086..6ab392cc --- a/Examples/examples_tick/manualtickex4.php +++ b/Examples/examples_tick/manualtickex4.php @@ -1,7 +1,7 @@ SetScale('linlin', 0, 0, $xmin, $xmax); -$graph->title->Set('Example with manual tick labels'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12); +$example_title = 'Example with manual tick labels'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('white'); // Setup a abackground gradient -$graph->SetBackgroundGradient('darkred:0.7', 'black', 2, BGRAD_MARGIN); +$graph->SetBackgroundGradient('darkred:0.7', 'black', 2, Graph\Configs::getConfig('BGRAD_MARGIN')); $graph->SetPlotGradient('black', 'darkred:0.8', 2); // Make sure that the X-axis is always at the bottom of the scale @@ -65,8 +66,8 @@ $graph->xaxis->SetMajTickPositions($tickPositions, $tickLabels); // Use Times font -$graph->xaxis->SetFont(FF_TIMES, FS_NORMAL, 11); -$graph->yaxis->SetFont(FF_TIMES, FS_NORMAL, 9); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); +$graph->yaxis->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 9); // Set colors for axis $graph->xaxis->SetColor('lightgray'); @@ -76,9 +77,9 @@ $graph->xgrid->Show(); // Show ticks outwards -$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->xaxis->SetTickSide(Graph\Configs::getConfig('SIDE_DOWN')); $graph->xaxis->SetLabelMargin(8); -$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->yaxis->SetTickSide(Graph\Configs::getConfig('SIDE_LEFT')); // Setup a filled y-grid //$graph->ygrid->SetFill(true,'darkgray:1.55@0.7','darkgray:1.6@0.7'); diff --git a/Examples/examples_tick/no_test_manualtickex1.php b/Examples/examples_tick/no_test_manualtickex1.php old mode 100755 new mode 100644 index 1de66a9a..79ef23ab --- a/Examples/examples_tick/no_test_manualtickex1.php +++ b/Examples/examples_tick/no_test_manualtickex1.php @@ -1,7 +1,7 @@ SetScale('intlin', 0, 0, $xmin, $xmax); -$graph->title->Set('Basic example with manual ticks'); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$example_title = 'Basic example with manual ticks'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // // Make sure that the X-axis is always at the bottom of the scale @@ -62,7 +63,7 @@ $graph->xaxis->SetLabelFormatString('My', true); // Use Ariel font -$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); // Add a X-grid $graph->xgrid->Show(); diff --git a/Examples/examples_tick/no_test_manualtickex1a.php b/Examples/examples_tick/no_test_manualtickex1a.php old mode 100755 new mode 100644 index 1de66a9a..79ef23ab --- a/Examples/examples_tick/no_test_manualtickex1a.php +++ b/Examples/examples_tick/no_test_manualtickex1a.php @@ -1,7 +1,7 @@ SetScale('intlin', 0, 0, $xmin, $xmax); -$graph->title->Set('Basic example with manual ticks'); -$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12); +$example_title = 'Basic example with manual ticks'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); // // Make sure that the X-axis is always at the bottom of the scale @@ -62,7 +63,7 @@ $graph->xaxis->SetLabelFormatString('My', true); // Use Ariel font -$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9); +$graph->xaxis->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); // Add a X-grid $graph->xgrid->Show(); diff --git a/Examples/examples_windrose/windrose_2plots_ex1.php b/Examples/examples_windrose/windrose_2plots_ex1.php old mode 100755 new mode 100644 index 1c1f789d..fc673bd2 --- a/Examples/examples_windrose/windrose_2plots_ex1.php +++ b/Examples/examples_windrose/windrose_2plots_ex1.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('Two windrose plots in one graph'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); -$graph->subtitle->Set('(Using Box() for each plot)'); +$example_title = 'Two windrose plots in one graph'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); +$subtitle_text = '(Using Box() for each plot)'; +$graph->subtitle->Set($subtitle_text); $wp = new Plot\WindrosePlot($data); -$wp->SetType(WINDROSE_TYPE8); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPE8')); $wp->SetSize(0.42); $wp->SetPos(0.25, 0.55); $wp->SetBox(); $wp2 = new Plot\WindrosePlot($data2); -$wp2->SetType(WINDROSE_TYPE16); +$wp2->SetType(Plot\Configs::getConfig('WINDROSE_TYPE16')); $wp2->SetSize(0.42); $wp2->SetPos(0.74, 0.55); $wp2->SetBox(); diff --git a/Examples/examples_windrose/windrose_bgimg_ex1.php b/Examples/examples_windrose/windrose_bgimg_ex1.php old mode 100755 new mode 100644 index b733bed8..6483df6e --- a/Examples/examples_windrose/windrose_bgimg_ex1.php +++ b/Examples/examples_windrose/windrose_bgimg_ex1.php @@ -1,7 +1,7 @@ SetMargin(25, 25, 25, 25); $graph->SetFrame(); - -$graph->title->Set('Example with background flag'); -#$graph->title->SetFont(FF_VERA,FS_BOLD,14); +$example_title = 'Example with background flag'; +$graph->title->set($example_title); +#$graph->title->SetFont(Graph\Configs::getConfig('FF_VERA'),FS_BOLD,14); //$graph->SetBackgroundImage(__DIR__.'/../assets/bkgimg.jpg',BGIMG_FILLFRAME); //$graph->SetBackgroundImageMix(90); -$graph->SetBackgroundCFlag(28, BGIMG_FILLFRAME, 15); +$graph->SetBackgroundCFlag(28, Graph\Configs::getConfig('BGIMG_FILLFRAME'), 15); $wp2 = new Plot\WindrosePlot($data2); -$wp2->SetType(WINDROSE_TYPE16); +$wp2->SetType(Plot\Configs::getConfig('WINDROSE_TYPE16')); $wp2->SetSize(0.55); $wp2->SetPos(0.5, 0.5); $wp2->SetAntiAlias(false); -$wp2->SetFont(FF_ARIAL, FS_BOLD, 10); +$wp2->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 10); $wp2->SetFontColor('black'); $wp2->SetCompassLabels($se_CompassLbl); $wp2->legend->SetMargin(20, 5); -$wp2->scale->SetZFont(FF_ARIAL, FS_NORMAL, 8); -$wp2->scale->SetFont(FF_ARIAL, FS_NORMAL, 9); +$wp2->scale->SetZFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 8); +$wp2->scale->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $wp2->scale->SetLabelFillColor('white', 'white'); $wp2->SetRangeColors(['green', 'yellow', 'red', 'brown']); diff --git a/Examples/examples_windrose/windrose_ex0.php b/Examples/examples_windrose/windrose_ex0.php old mode 100755 new mode 100644 index eee6336d..3c916aab --- a/Examples/examples_windrose/windrose_ex0.php +++ b/Examples/examples_windrose/windrose_ex0.php @@ -1,7 +1,7 @@ [2, 3, 5], ]; // First create a new windrose graph with a title -$__width = 400; -$__height = 400; -$graph = new Graph\WindroseGraph($__width, $__height); -$graph->title->Set('A basic Windrose graph'); +$__width = 400; +$__height = 400; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'A basic Windrose graph'; +$graph->title->set($example_title); // Create the windrose plot. $wp = new Plot\WindrosePlot($data); diff --git a/Examples/examples_windrose/windrose_ex1.php b/Examples/examples_windrose/windrose_ex1.php old mode 100755 new mode 100644 index 8ac6b560..49830a46 --- a/Examples/examples_windrose/windrose_ex1.php +++ b/Examples/examples_windrose/windrose_ex1.php @@ -1,7 +1,7 @@ title->Set('Windrose basic example'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Windrose basic example'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); // Create the windrose plot. diff --git a/Examples/examples_windrose/windrose_ex1b.php b/Examples/examples_windrose/windrose_ex1b.php old mode 100755 new mode 100644 index 9a7e6d91..e171a328 --- a/Examples/examples_windrose/windrose_ex1b.php +++ b/Examples/examples_windrose/windrose_ex1b.php @@ -1,7 +1,7 @@ [2, 7, 12], ]; // First create a new windrose graph with a title -$__width = 400; -$__height = 400; -$graph = new Graph\WindroseGraph($__width, $__height); -$graph->title->Set('Windrose example 1b'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$__width = 400; +$__height = 400; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Windrose example 1b'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); // Create the windrose plot. @@ -33,7 +34,7 @@ // Setup the range so that the values do not touch eachother $wp->SetRanges([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]); -$wp->SetRangeStyle(RANGE_DISCRETE); // Cmp with RANGE_OVERLAPPING as default +$wp->SetRangeStyle(Plot\Configs::getConfig('RANGE_DISCRETE')); // Cmp with Graph\Configs::getConfig('RANGE_OVERLAPPING') as default // Send the graph to the browser $graph->Stroke(); diff --git a/Examples/examples_windrose/windrose_ex2.1.php b/Examples/examples_windrose/windrose_ex2.1.php old mode 100755 new mode 100644 index c8b02b23..ecc33c05 --- a/Examples/examples_windrose/windrose_ex2.1.php +++ b/Examples/examples_windrose/windrose_ex2.1.php @@ -1,7 +1,7 @@ title->Set('Windrose example 2'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Windrose example 2'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); // Create the windrose plot. $wp = new Plot\WindrosePlot($data); // Make it have 8 compass direction -$wp->SetType(WINDROSE_TYPE4); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPE4')); // Setup the weight of the laegs for the different ranges $weights = array_fill(0, 8, 10); $wp->SetRangeWeights($weights); // Adjust the font and font color for scale labels -$wp->scale->SetFont(FF_TIMES, FS_NORMAL, 11); +$wp->scale->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); $wp->scale->SetFontColor('navy'); // Set the diametr for the plot to 160 pixels @@ -47,7 +48,7 @@ $wp->SetZCircleSize(0.2); // Adjust the font and font color for compass directions -$wp->SetFont(FF_ARIAL, FS_NORMAL, 12); +$wp->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $wp->SetFontColor('darkgreen'); // Add and send back to browser diff --git a/Examples/examples_windrose/windrose_ex2.php b/Examples/examples_windrose/windrose_ex2.php old mode 100755 new mode 100644 index 8e83d825..3740de2e --- a/Examples/examples_windrose/windrose_ex2.php +++ b/Examples/examples_windrose/windrose_ex2.php @@ -1,7 +1,7 @@ title->Set('Windrose example 2'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Windrose example 2'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); // Create the windrose plot. $wp = new Plot\WindrosePlot($data); // Make it have 8 compass direction -$wp->SetType(WINDROSE_TYPE8); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPE8')); // Setup the weight of the laegs for the different ranges $weights = array_fill(0, 8, 10); $wp->SetRangeWeights($weights); // Adjust the font and font color for scale labels -$wp->scale->SetFont(FF_TIMES, FS_NORMAL, 11); +$wp->scale->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); $wp->scale->SetFontColor('navy'); // Set the diametr for the plot to 160 pixels @@ -47,7 +48,7 @@ $wp->SetZCircleSize(0.2); // Adjust the font and font color for compass directions -$wp->SetFont(FF_ARIAL, FS_NORMAL, 12); +$wp->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 12); $wp->SetFontColor('darkgreen'); // Add and send back the graph to the client diff --git a/Examples/examples_windrose/windrose_ex3.php b/Examples/examples_windrose/windrose_ex3.php old mode 100755 new mode 100644 index bd596d35..77056672 --- a/Examples/examples_windrose/windrose_ex3.php +++ b/Examples/examples_windrose/windrose_ex3.php @@ -1,7 +1,7 @@ SetShadow('darkgray'); -// Setup titles -$graph->title->Set('Windrose example 3'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +// Setup titles$example_title='Windrose example 3'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); -$graph->subtitle->Set('(Multiple plots in the same graph)'); -$graph->subtitle->SetFont(FF_VERDANA, FS_NORMAL, 9); +$subtitle_text = '(Multiple plots in the same graph)'; +$graph->subtitle->Set($subtitle_text); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_NORMAL'), 9); $graph->subtitle->SetColor('navy'); // Create the two windrose plots. @@ -53,7 +53,7 @@ $wp[$i]->SetType($layout[$i][0]); // Adjust the font and font color for scale labels - $wp[$i]->scale->SetFont(FF_TIMES, FS_NORMAL, 10); + $wp[$i]->scale->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 10); $wp[$i]->scale->SetFontColor('navy'); // Set the position of the plot @@ -66,7 +66,7 @@ $wp[$i]->SetZCircleSize($layout[$i][4]); // Adjust the font and font color for compass directions - $wp[$i]->SetFont(FF_ARIAL, FS_NORMAL, 10); + $wp[$i]->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $wp[$i]->SetFontColor('darkgreen'); // Add legend text diff --git a/Examples/examples_windrose/windrose_ex4.php b/Examples/examples_windrose/windrose_ex4.php old mode 100755 new mode 100644 index 383d23e0..6d4e0691 --- a/Examples/examples_windrose/windrose_ex4.php +++ b/Examples/examples_windrose/windrose_ex4.php @@ -1,7 +1,7 @@ title->Set('Windrose example 4'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Windrose example 4'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); // Create the windrose plot. $wp = new Plot\WindrosePlot($data); // Adjust the font and font color for scale labels -$wp->scale->SetFont(FF_TIMES, FS_NORMAL, 11); +$wp->scale->SetFont(Graph\Configs::getConfig('FF_TIMES'), Graph\Configs::getConfig('FS_NORMAL'), 11); $wp->scale->SetFontColor('navy'); // Set the diameter and position for plot @@ -42,11 +43,11 @@ $wp->scale->SetZeroLabel("Station 12\n(Calm %d%%)"); // Adjust color and font for center circle text -$wp->scale->SetZFont(FF_ARIAL, FS_NORMAL, 9); +$wp->scale->SetZFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $wp->scale->SetZFontColor('darkgreen'); // Adjust the font and font color for compass directions -$wp->SetFont(FF_ARIAL, FS_NORMAL, 10); +$wp->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $wp->SetFontColor('darkgreen'); // Adjust the margin to the compass directions diff --git a/Examples/examples_windrose/windrose_ex6.1.php b/Examples/examples_windrose/windrose_ex6.1.php old mode 100755 new mode 100644 index 6b2b0f3a..d1010845 --- a/Examples/examples_windrose/windrose_ex6.1.php +++ b/Examples/examples_windrose/windrose_ex6.1.php @@ -1,7 +1,7 @@ title->Set('Using chinese charecters'); -#$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); +$example_title = 'Using chinese charecters'; +$graph->title->set($example_title); +#$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'),FS_BOLD,12); $graph->title->SetColor('navy'); -$graph->subtitle->Set('(Free type plot)'); -#$graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10); +$subtitle_text = '(Free type plot)'; +$graph->subtitle->Set($subtitle_text); +#$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_VERDANA'),FS_ITALIC,10); $graph->subtitle->SetColor('navy'); // Create the windrose plot. $wp = new Plot\WindrosePlot($data); // Setup a free plot -$wp->SetType(WINDROSE_TYPEFREE); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPEFREE')); // Setup labels $wp->SetLabels($labels); -$wp->SetLabelPosition(LBLPOSITION_CENTER); +$wp->SetLabelPosition(Plot\Configs::getConfig('LBLPOSITION_CENTER')); $wp->SetLabelMargin(30); // Setup the colors for the ranges $wp->SetRangeColors($rangeColors); // Adjust the font and font color for scale labels -#$wp->scale->SetFont(FF_ARIAL,FS_NORMAL,9); +#$wp->scale->SetFont(Graph\Configs::getConfig('FF_ARIAL'),FS_NORMAL,9); // Set the diameter and position for plot #$wp->SetSize(240); @@ -66,7 +68,7 @@ $wp->SetPos(0.5, 0.5); // Adjust the font and font color for compass directions -#$wp->SetFont(FF_CHINESE,FS_NORMAL,12); +$wp->SetFont(Graph\Configs::getConfig('FF_CHINESE'), Graph\Configs::getConfig('FS_NORMAL'), 12); $wp->SetFontColor('darkgreen'); // Adjust grid colors @@ -78,15 +80,15 @@ // Set legend label font color $wp->legend->SetLFontColor('orange:0.7'); -#$wp->legend->SetLFont(FF_ARIAL,FS_ITALIC,8); +#$wp->legend->SetLFont(Graph\Configs::getConfig('FF_ARIAL'),FS_ITALIC,8); // Display legend values with no decimals $wp->legend->SetFormat('%d'); // Set the circle font to use chinse character set -// Note: When FF_CHINESE is used the input charectr data are +// Note: When Graph\Configs::getConfig('FF_CHINESE') is used the input charectr data are // assumed to already be in utf-8 encoding -#$wp->legend->SetCFont(FF_CHINESE,FS_NORMAL,14); +#$wp->legend->SetCFont(Graph\Configs::getConfig('FF_CHINESE'),FS_NORMAL,14); $wp->legend->SetCircleText($ctxt); $wp->legend->SetCFontColor('red'); diff --git a/Examples/examples_windrose/windrose_ex6.php b/Examples/examples_windrose/windrose_ex6.php old mode 100755 new mode 100644 index 2a6db790..d1bd483f --- a/Examples/examples_windrose/windrose_ex6.php +++ b/Examples/examples_windrose/windrose_ex6.php @@ -1,7 +1,7 @@ title->Set('Windrose example 6'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +// Setup titles$example_title='Windrose example 6'; $graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); -$graph->subtitle->Set('(Free type plot)'); -$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10); +$subtitle_text = '(Free type plot)'; +$graph->subtitle->Set($subtitle_text); +$graph->subtitle->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_ITALIC'), 10); $graph->subtitle->SetColor('navy'); // Create the windrose plot. $wp = new Plot\WindrosePlot($data); // Setup a free plot -$wp->SetType(WINDROSE_TYPEFREE); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPEFREE')); // Setup labels $wp->SetLabels($labels); -$wp->SetLabelPosition(LBLPOSITION_CENTER); +$wp->SetLabelPosition(Plot\Configs::getConfig('LBLPOSITION_CENTER')); $wp->SetLabelMargin(30); // Setup the colors for the ranges $wp->SetRangeColors($rangeColors); // Adjust the font and font color for scale labels -$wp->scale->SetFont(FF_ARIAL, FS_NORMAL, 9); +$wp->scale->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); // Set the diameter and position for plot $wp->SetSize(230); $wp->SetZCircleSize(30); // Adjust the font and font color for compass directions -$wp->SetFont(FF_ARIAL, FS_NORMAL, 10); +$wp->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $wp->SetFontColor('darkgreen'); // Adjust grid colors diff --git a/Examples/examples_windrose/windrose_ex7.1.php b/Examples/examples_windrose/windrose_ex7.1.php old mode 100755 new mode 100644 index 3534e84f..b791d532 --- a/Examples/examples_windrose/windrose_ex7.1.php +++ b/Examples/examples_windrose/windrose_ex7.1.php @@ -1,7 +1,7 @@ title->Set('Japanese locale'); -#$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); +$__width = 590; +$__height = 580; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Japanese locale'; +$graph->title->set($example_title); +#$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'),FS_BOLD,14); $graph->title->SetColor('navy'); // Create the free windrose plot. $wp = new Plot\WindrosePlot($data); -$wp->SetType(WINDROSE_TYPE8); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPE8')); // Add some "arbitrary" text to the center $wp->scale->SetZeroLabel("SOx\n8%%"); @@ -47,14 +48,14 @@ $jp_CompassLbl = ['東', '', '北東', '', '北', '', '北西', '', '西', '', '南西', '', '南', '', '南東', '', ]; $wp->SetCompassLabels($jp_CompassLbl); -#$wp->SetFont(FF_MINCHO,FS_NORMAL,15); +#$wp->SetFont(Graph\Configs::getConfig('FF_MINCHO'),FS_NORMAL,15); // Localize the "Calm" text into Swedish and make the circle // slightly bigger than default $jp_calmtext = '平穏'; $wp->legend->SetCircleText($jp_calmtext); $wp->legend->SetCircleRadius(20); -#$wp->legend->SetCFont(FF_MINCHO,FS_NORMAL,10); +#$wp->legend->SetCFont(Graph\Configs::getConfig('FF_MINCHO'),FS_NORMAL,10); $wp->legend->SetMargin(5, 0); $wp->SetPos(0.5, 0.5); @@ -64,7 +65,7 @@ // Set the scale to always have max value of 30 $wp->scale->Set(30, 10); -#$wp->scale->SetFont(FF_VERA,FS_NORMAL,12); +#$wp->scale->SetFont(Graph\Configs::getConfig('FF_VERA'),FS_NORMAL,12); // Finally add it to the graph and send back to client $graph->Add($wp); diff --git a/Examples/examples_windrose/windrose_ex7.php b/Examples/examples_windrose/windrose_ex7.php old mode 100755 new mode 100644 index 8b3b4df0..64fd4efb --- a/Examples/examples_windrose/windrose_ex7.php +++ b/Examples/examples_windrose/windrose_ex7.php @@ -1,7 +1,7 @@ title->Set('Windrose example 7'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$__width = 400; +$__height = 450; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Windrose example 7'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetColor('navy'); // Create the free windrose plot. $wp = new Plot\WindrosePlot($data); -$wp->SetType(WINDROSE_TYPE16); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPE16')); // Add some "arbitrary" text to the center $wp->scale->SetZeroLabel("SOx\n8%%"); diff --git a/Examples/examples_windrose/windrose_ex8.1.php b/Examples/examples_windrose/windrose_ex8.1.php old mode 100755 new mode 100644 index f2f1e66d..5d7c3911 --- a/Examples/examples_windrose/windrose_ex8.1.php +++ b/Examples/examples_windrose/windrose_ex8.1.php @@ -1,7 +1,7 @@ 'solid', 150 => 'solid']; // First create a new windrose graph with a title -$__width = 400; -$__height = 460; -$graph = new Graph\WindroseGraph($__width, $__height); -$graph->title->Set('Adding label backgrounds'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$__width = 400; +$__height = 460; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Adding label backgrounds'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetColor('navy'); // Create the free windrose plot. $wp = new Plot\WindrosePlot($data); -$wp->SetType(WINDROSE_TYPEFREE); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPEFREE')); $wp->scale->SetLabelFillColor('lightblue', 'black'); // Specify colors weights and style for the radial gridlines diff --git a/Examples/examples_windrose/windrose_ex8.php b/Examples/examples_windrose/windrose_ex8.php old mode 100755 new mode 100644 index 0534fb6d..985bc009 --- a/Examples/examples_windrose/windrose_ex8.php +++ b/Examples/examples_windrose/windrose_ex8.php @@ -1,7 +1,7 @@ 'solid', 150 => 'solid']; // First create a new windrose graph with a title -$__width = 400; -$__height = 500; -$graph = new Graph\WindroseGraph($__width, $__height); -$graph->title->Set('Windrose example 8'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$__width = 400; +$__height = 500; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Windrose example 8'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetColor('navy'); // Create the free windrose plot. $wp = new Plot\WindrosePlot($data); -$wp->SetType(WINDROSE_TYPEFREE); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPEFREE')); // Specify colors weights and style for the radial gridlines $wp->SetRadialColors($axiscolors); diff --git a/Examples/examples_windrose/windrose_ex9.php b/Examples/examples_windrose/windrose_ex9.php old mode 100755 new mode 100644 index 8d454226..70116e98 --- a/Examples/examples_windrose/windrose_ex9.php +++ b/Examples/examples_windrose/windrose_ex9.php @@ -1,7 +1,7 @@ 'solid']; // First create a new windrose graph with a title -$__width = 400; -$__height = 500; -$graph = new Graph\WindroseGraph($__width, $__height); -$graph->title->Set('Windrose example 9'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$__width = 400; +$__height = 500; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Windrose example 9'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetColor('navy'); // Create the free windrose plot. $wp = new Plot\WindrosePlot($data); -$wp->SetType(WINDROSE_TYPE16); +$wp->SetType(Plot\Configs::getConfig('WINDROSE_TYPE16')); // Specify colors weights and style for the radial gridlines $wp->SetRadialColors($axiscolors); diff --git a/Examples/examples_windrose/no_test_windrose_ex5.php b/Examples/examples_windrose/windrose_no_test_ex5.php old mode 100755 new mode 100644 similarity index 79% rename from Examples/examples_windrose/no_test_windrose_ex5.php rename to Examples/examples_windrose/windrose_no_test_ex5.php index 406942b7..b625e80b --- a/Examples/examples_windrose/no_test_windrose_ex5.php +++ b/Examples/examples_windrose/windrose_no_test_ex5.php @@ -1,7 +1,7 @@ title->Set('Windrose example 5'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$__width = 570; +$__height = 430; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Windrose example 5'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); // We store the layout for each of the text boxes in an array @@ -39,7 +40,7 @@ $txtlayout = [ [0.97, 0.15, 25, 'left', 'black', 'lightblue'], [0.97, 0.4, 20, 'right', 'black', 'lightblue'], - [0.97, 0.7, 20, 'center', 'darkred', false, FF_COMIC, FS_NORMAL, 12], + [0.97, 0.7, 20, 'center', 'darkred', false, Graph\Configs::getConfig('FF_COMIC'), Graph\Configs::getConfig('FS_NORMAL'), 12], ]; // Setup graph background color @@ -73,7 +74,7 @@ $wp->SetRangeColors($rangeColors); // Adjust the font and font color for scale labels -$wp->scale->SetFont(FF_ARIAL, FS_NORMAL, 9); +$wp->scale->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 9); $wp->scale->SetFontColor('navy'); // Set the diameter and position for plot @@ -83,7 +84,7 @@ $wp->SetZCircleSize(0.2); // Adjust the font and font color for compass directions -$wp->SetFont(FF_ARIAL, FS_NORMAL, 10); +$wp->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_NORMAL'), 10); $wp->SetFontColor('darkgreen'); // Adjust the margin to the compass directions diff --git a/Examples/examples_windrose/no_test_windrose_ex9.1.php b/Examples/examples_windrose/windrose_no_test_ex9.1.php old mode 100755 new mode 100644 similarity index 59% rename from Examples/examples_windrose/no_test_windrose_ex9.1.php rename to Examples/examples_windrose/windrose_no_test_ex9.1.php index 31c55c3c..046a1953 --- a/Examples/examples_windrose/no_test_windrose_ex9.1.php +++ b/Examples/examples_windrose/windrose_no_test_ex9.1.php @@ -1,7 +1,7 @@ title->Set('Interpretation of ordinal keys'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14); +$__width = 650; +$__height = 350; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Interpretation of ordinal keys'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 14); $graph->title->SetColor('navy'); // Create the first plot $wp1 = new Plot\WindrosePlot($data); -$wp1->SetType(WINDROSE_TYPE16); +$wp1->SetType(Plot\Configs::getConfig('WINDROSE_TYPE16')); // This is the default encoding -$wp1->SetDataKeyEncoding(KEYENCODING_ANTICLOCKWISE); +$wp1->SetDataKeyEncoding(Graph\Configs::getConfig('KEYENCODING_ANTICLOCKWISE')); $wp1->legend->Hide(); $wp1->SetPos($xpos1, $ypos1); $wp1->SetSize(0.5); // Create the second plot $wp2 = new Plot\WindrosePlot($data); -$wp2->SetType(WINDROSE_TYPE16); -$wp2->SetDataKeyEncoding(KEYENCODING_CLOCKWISE); +$wp2->SetType(Plot\Configs::getConfig('WINDROSE_TYPE16')); +$wp2->SetDataKeyEncoding(Graph\Configs::getConfig('KEYENCODING_CLOCKWISE')); $wp2->legend->Hide(); $wp2->SetPos($xpos2, $ypos1); $wp2->SetSize(0.5); $txt1 = new Text('KEYENCODING_ANTICLOCKWISE'); -$txt1->SetFont(FF_COURIER, FS_BOLD, 12); +$txt1->SetFont(Graph\Configs::getConfig('FF_COURIER'), Graph\Configs::getConfig('FS_BOLD'), 12); $txt1->SetPos($xpos1, $ypos2); $txt1->SetAlign('center', 'top'); $txt2 = new Text('KEYENCODING_CLOCKWISE'); -$txt2->SetFont(FF_COURIER, FS_BOLD, 12); +$txt2->SetFont(Graph\Configs::getConfig('FF_COURIER'), Graph\Configs::getConfig('FS_BOLD'), 12); $txt2->SetPos($xpos2, $ypos2); $txt2->SetAlign('center', 'top'); diff --git a/Examples/examples_windrose/no_test_windrose_icon_ex1.php b/Examples/examples_windrose/windrose_no_test_icon_ex1.php old mode 100755 new mode 100644 similarity index 78% rename from Examples/examples_windrose/no_test_windrose_icon_ex1.php rename to Examples/examples_windrose/windrose_no_test_icon_ex1.php index 9ff0c277..eccbbdf5 --- a/Examples/examples_windrose/no_test_windrose_icon_ex1.php +++ b/Examples/examples_windrose/windrose_no_test_icon_ex1.php @@ -1,7 +1,7 @@ Add($icon); // Setup title -$graph->title->Set('Windrose icon example'); -$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12); +$example_title = 'Windrose icon example'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_VERDANA'), Graph\Configs::getConfig('FS_BOLD'), 12); $graph->title->SetColor('navy'); // Create the windrose plot. diff --git a/Examples/examples_windrose/no_test_windrose_layout_ex0.php b/Examples/examples_windrose/windrose_no_test_layout_ex0.php old mode 100755 new mode 100644 similarity index 82% rename from Examples/examples_windrose/no_test_windrose_layout_ex0.php rename to Examples/examples_windrose/windrose_no_test_layout_ex0.php index 7fa7301a..8f2fd32e --- a/Examples/examples_windrose/no_test_windrose_layout_ex0.php +++ b/Examples/examples_windrose/windrose_no_test_layout_ex0.php @@ -1,7 +1,7 @@ SetShadow(); - -$graph->title->Set('Multiple plots with automatic layout'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$example_title = 'Multiple plots with automatic layout'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); // Setup the individual windrose plots $wp = []; diff --git a/Examples/examples_windrose/no_test_windrose_layout_ex1.php b/Examples/examples_windrose/windrose_no_test_layout_ex1.php old mode 100755 new mode 100644 similarity index 75% rename from Examples/examples_windrose/no_test_windrose_layout_ex1.php rename to Examples/examples_windrose/windrose_no_test_layout_ex1.php index ad920386..8dfdd2b6 --- a/Examples/examples_windrose/no_test_windrose_layout_ex1.php +++ b/Examples/examples_windrose/windrose_no_test_layout_ex1.php @@ -1,7 +1,7 @@ title->Set('Multiple plots with automatic layout'); -$graph->title->SetFont(FF_ARIAL, FS_BOLD, 14); +$__width = 750; +$__height = 700; +$graph = new Graph\WindroseGraph($__width, $__height); +$example_title = 'Multiple plots with automatic layout'; +$graph->title->set($example_title); +$graph->title->SetFont(Graph\Configs::getConfig('FF_ARIAL'), Graph\Configs::getConfig('FS_BOLD'), 14); // Setup the individual windrose plots $wp = []; for ($i = 0; $i < 5; ++$i) { $wp[$i] = new Plot\WindrosePlot($data[$i]); - $wp[$i]->SetType(WINDROSE_TYPE8); + $wp[$i]->SetType(Plot\Configs::getConfig('WINDROSE_TYPE8')); if ($i < 2) { $wp[$i]->SetSize(0.28); } else { diff --git a/Examples/index.html b/Examples/index.html index 3e1abc6c..e0386e7b 100755 --- a/Examples/index.html +++ b/Examples/index.html @@ -1,75 +1,60 @@ - -
+
- - - - - - - + + + + + + + + - - + -
+