function FrxSVGGraph::renderGraph in Forena Reports 7.2
Same name and namespace in other branches
- 6.2 plugins/FrxSVGGraph.inc \FrxSVGGraph::renderGraph()
- 7.3 renderers/FrxSVGGraph.inc \FrxSVGGraph::renderGraph()
- 7.4 renderers/FrxSVGGraph.inc \FrxSVGGraph::renderGraph()
8 calls to FrxSVGGraph::renderGraph()
- FrxSVGGraph::barGraph in plugins/
FrxSVGGraph.inc - FrxSVGGraph::groupedBarGraph in plugins/
FrxSVGGraph.inc - FrxSVGGraph::lineGraph in plugins/
FrxSVGGraph.inc - FrxSVGGraph::multiLineGraph in plugins/
FrxSVGGraph.inc - FrxSVGGraph::multiScatterPlot in plugins/
FrxSVGGraph.inc
File
- plugins/
FrxSVGGraph.inc, line 108
Class
Code
function renderGraph($type, $options, $data) {
$links = $this->links;
$width = @$options['width'] ? @$options['width'] : 600;
$height = @$options['height'] ? @$options['height'] : 400;
$graph = new SVGGraph($width, $height, $options);
$this->graph = $graph;
$graph
->Values($data);
if (is_array(@$options['colors'])) {
$graph->colours = $options['colors'];
}
if ($links) {
$graph
->Links($links);
}
$output = $graph
->Fetch($type, FALSE);
return $output;
}