You are here

function statspro_get_bar_chart in Statistics Pro 6.2

Returns the HTML for one bar graph.

Parameters

<string> $title:

<array> $series:

<array> $x_labels:

<mixed> $transpose NULL or BOOL:

Return value

<string>

1 call to statspro_get_bar_chart()
statspro_chart_summary in ./statspro_overview.inc
General chart function for overview page.

File

./statspro_graphs.inc, line 90
Graphs generation help.

Code

function statspro_get_bar_chart($title, $series, $x_labels, $transpose = NULL) {
  $canvas = charts_graphs_get_graph(statspro_get_current_charting_option());
  $canvas->title = $title;
  $canvas->type = 'bar';
  $canvas->y_legend = 'Y Legend';
  $canvas->theme = '37signals';
  $canvas->width = 700;
  $canvas->height = 200;
  $canvas->series = $series;
  $canvas->x_labels = $x_labels;
  if ($transpose !== NULL) {
    $canvas->transpose = $transpose;
  }
  return "\n<div align='center'>\n" . $canvas
    ->get_chart() . "\n</div>\n";
}