KoolChart - Excellent PHP Chart and GraphKoolChart - Excellent PHP Chart and GraphFullVersion 2.6.0.2 released on 25/11/2016

Functionality - Chart's transformation

* Note:Generate your own chart with Code Generator

Description & Sample code

To set a chart's various options, please use the following properties:

$chart = new KoolChart("KoolChart1");
$chart->set(array(
    "Width" => 660,
    "Height" => 600,
    "Title" => array(
       "Text" => "My chart's title",
       "Appearance" => array(
          "Position" => "Top",
          "Translate" => [0, 0],
          "SelfTranslate" => [0, 0],
          "SelfWholeTranslate" => [0, 0],
          "FullyVisible" => false,
       ),
    ),
    "Legend" => array(
       "Appearance" => array(
          "Position" => "Top",
          "BackgroundColor" => "white",
          "Translate" => [0, 0],
          "SelfTranslate" => [0, 0],
          "SelfWholeTranslate" => [0, 0],
          "FullyVisible" => false,
       ),
    ),
    "PlotArea" => array(
       "XAxis" => array(
          "Title" => "X Axis",
          "TitleAppearance" => array(
             "Position" => "center",
             "RotationAngle" => 0,
             "Translate" => [0, 0],
             "SelfTranslate" => [0, 0],
             "SelfWholeTranslate" => [0, 0],
             "FullyVisible" => false,
          ),
          "LabelsAppearance" => array(
             "RotationAngle" => 0,
             "Translate" => [0, 0],
             "SelfTranslate" => [0, 0],
             "SelfWholeTranslate" => [0, 0],
             "FullyVisible" => false,
          ),
          "Items" => array(
             array(
                "Text" => "Category 0",
             ),
             array(
                "Text" => "Category 1",
             ),
             array(
                "Text" => "Category 2",
             ),
             array(
                "Text" => "Category 3",
             ),
          ),
       ),
       "YAxis" => array(
          "Title" => "Y Axis",
             "TitleAppearance" => array(
             "Position" => "center",
             "RotationAngle" => 0,
             "Translate" => [0, 0],
             "SelfTranslate" => [0, 0],
             "SelfWholeTranslate" => [0, 0],
             "FullyVisible" => false,
          ),
          "LabelsAppearance" => array(
             "DataFormatString" => "{0} M",
             "RotationAngle" => 0,
             "Translate" => [0, 0],
             "SelfTranslate" => [0, 0],
             "SelfWholeTranslate" => [0, 0],
             "FullyVisible" => false,
          ),	
       ),
    ),
));

or:

$chart = new KoolChart('KoolChart1');
$s = $chart->getSetting();
$s["Width"] = 660;
$s["Height"] = 600;

$s["Title"]["Text"] = "My chart's title";
$s["Title"]["Appearance"]["Position"] = "Top";
$s["Title"]["Appearance"]["Translate"] = [0, 0];
$s["Title"]["Appearance"]["SelfTranslate"] = [0, 0];
$s["Title"]["Appearance"]["SelfWholeTranslate"] = [0, 0];
$s["Title"]["Appearance"]["FullyVisible"] = false;

$s["Legend"]["Appearance"]["Position"] = "Top";
$s["Legend"]["Appearance"]["Translate"] = [0, 0];
$s["Legend"]["Appearance"]["SelfTranslate"] = [0, 0];
$s["Legend"]["Appearance"]["SelfWholeTranslate"] = [0, 0];
$s["Legend"]["Appearance"]["FullyVisible"] = false;

$s["PlotArea"]["XAxis"]["Title"] = "X Axis";
$s["PlotArea"]["XAxis"]["TitleAppearance"]["Position"] = "center";
$s["PlotArea"]["XAxis"]["TitleAppearance"]["RotationAngle"] = 0;
$s["PlotArea"]["XAxis"]["TitleAppearance"]["Translate"] = [0, 0];
$s["PlotArea"]["XAxis"]["TitleAppearance"]["SelfTranslate"] = [0, 0];
$s["PlotArea"]["XAxis"]["TitleAppearance"]["SelfWholeTranslate"] = [0, 0];
$s["PlotArea"]["XAxis"]["TitleAppearance"]["FullyVisible"] = false;

$s["PlotArea"]["XAxis"]["LabelsAppearance"]["RotationAngle"] = 0;
$s["PlotArea"]["XAxis"]["LabelsAppearance"]["Translate"] = [0, 0];
$s["PlotArea"]["XAxis"]["LabelsAppearance"]["SelfTranslate"] = [0, 0];
$s["PlotArea"]["XAxis"]["LabelsAppearance"]["SelfWholeTranslate"] = [0, 0];
$s["PlotArea"]["XAxis"]["LabelsAppearance"]["FullyVisible"] = false;

$s["PlotArea"]["XAxis"]["Items"][0]["Text"] = "Category 0";
$s["PlotArea"]["XAxis"]["Items"][1]["Text"] = "Category 1";
$s["PlotArea"]["XAxis"]["Items"][2]["Text"] = "Category 2";
$s["PlotArea"]["XAxis"]["Items"][3]["Text"] = "Category 3";

$s["PlotArea"]["YAxis"]["Title"] = "Y Axis";
$s["PlotArea"]["YAxis"]["TitleAppearance"]["Position"] = "Center";
$s["PlotArea"]["YAxis"]["TitleAppearance"]["RotationAngle"] = 0;
$s["PlotArea"]["YAxis"]["TitleAppearance"]["Translate"] = [0, 0];
$s["PlotArea"]["YAxis"]["TitleAppearance"]["SelfTranslate"] = [0, 0];
$s["PlotArea"]["YAxis"]["TitleAppearance"]["SelfWholeTranslate"] = [0, 0];
$s["PlotArea"]["YAxis"]["TitleAppearance"]["FullyVisible"] = false;

$s["PlotArea"]["YAxis"]["LabelsAppearance"]["DataFormatString"] = "{0} M";
$s["PlotArea"]["YAxis"]["LabelsAppearance"]["RotationAngle"] = 0;
$s["PlotArea"]["YAxis"]["LabelsAppearance"]["Translate"] = [0, 0];
$s["PlotArea"]["YAxis"]["LabelsAppearance"]["SelfTranslate"] = [0, 0];
$s["PlotArea"]["YAxis"]["LabelsAppearance"]["SelfWholeTranslate"] = [0, 0];
$s["PlotArea"]["YAxis"]["LabelsAppearance"]["FullyVisible"] = false;

$chart->set($s);