function StatsChartImpl($chartType, $graphCfg) { parent::StatsChart($chartType, $graphCfg); $this->phplot = new PHPlot($this->width, $this->height); $this->phplot->SetImageBorderType('plain'); if ($chartType == 'piechart') { $this->phplot->SetDataType('text-data-single'); $this->phplot->SetPlotType('pie'); $this->phplot->SetLabelScalePosition(0.35); //$this->phplot->SetDataColors(array('#BDC7F7', '#DCE6FB', 'yellow', 'red', 'blue', 'orange', 'purple')); } else { $this->phplot->SetPlotType('bar'); $this->phplot->SetDataType('text-data'); # Turn off X tick labels and ticks because they don't apply here: $this->phplot->SetXTickLabelPos('none'); $this->phplot->SetXTickPos('none'); $this->phplot->SetXLabelAngle(90); # Make sure Y=0 is displayed: $this->phplot->SetPlotAreaWorld(NULL, 0); # Y Tick marks are off, but Y Tick Increment also controls the Y grid lines: //$this->phplot->SetYTickIncrement(100); # Turn on Y data labels: $this->phplot->SetYDataLabelPos('plotin'); # With Y data labels, we don't need Y ticks or their labels, so turn them off. $this->phplot->SetYTickLabelPos('none'); $this->phplot->SetYTickPos('none'); } }
function StatsChartImpl($chartType, $graphCfg) { parent::StatsChart($chartType, $graphCfg); if ($chartType == 'piechart') { $this->libchart = new PieChart($this->width, $this->height); } else { $this->libchart = new VerticalChart($this->width, $this->height); } $this->libchart->setLogo(NULL); if ($this->transparent) { $this->libchart->setTransparent(TRUE); } }
function StatsChartImpl($chartType, $graphCfg) { parent::StatsChart($chartType, $graphCfg); if ($chartType == 'piechart') { $this->libchart = new PieChart($this->width, $this->height); } else { $this->libchart = new VerticalBarChart($this->width, $this->height); } $this->libchart->getPlot()->setLogoFileName(NULL); $this->dataSet = new XYDataSet(); if ($this->transparent) { $this->libchart->getPlot()->setTransparent(TRUE); } }
function StatsChartImpl($chartType, $graphCfg) { parent::StatsChart($chartType, $graphCfg); if ($this->chartType == 'piechart') { $this->graph = new PieGraph($this->width, $this->height, ""); } else { $this->graph = new Graph($this->width, $this->height, ""); $this->graph->SetScale("textlin"); $this->graph->yaxis->scale->SetGrace(20); $this->graph->SetMargin(25, 25, 50, 125); $this->graph->yaxis->HideZeroLabel(); $this->graph->yscale->SetAutoMin(0); $this->graph->yaxis->SetLabelFormatString("%2d"); $this->graph->xaxis->SetLabelAngle(90); } if ($this->transparent) { $this->graph->img->setTransparent("white"); } $this->graph->SetFrame(false); }
function StatsChartImpl($chartType, $graphCfg) { parent::StatsChart($chartType, $graphCfg); }
$idx = 12 + $idx; } $idx++; } if (isset($details['dow'])) { $idx = $details['dow']; } if (isset($details['dom'])) { $idx = $details['dom']; } $count = $details['count']; $this->chart['chart_data'][1][$idx] = $count; $this->chart['chart_value_text'][1][$idx] = $this->FormatNumber($count); } break; } } } header("Pragma: private"); header("Cache-control: private"); /** * We need to call the chart ourselves because of the way the chart needs to get the data. */ $SSChart = new StatsChart(); $SSChart->Process();