You are here

function quant_generate_chart in Quant 6

Wrapper for chart generation functions

1 call to quant_generate_chart()
quant_process in ./quant.module
Process quants and convert them to charts with data plotted

File

includes/chart.inc, line 11
Chart building functions

Code

function quant_generate_chart(&$quant) {

  // Initialize the chart
  $function = "_quant_init_{$quant->chartType}_chart";
  $function($quant);

  // Currently only supports adding item sum to title
  quant_override_title($quant);

  // Give the chart color
  quant_chart_add_color($quant);

  // Set the size of the chart
  quant_chart_add_size($quant);

  // Generate and return the chart
  $output = variable_get('quant_use_images', TRUE) ? 'chart' : 'table';
  $function = "_quant_generate_{$output}_{$quant->dataType}";
  $function($quant);
}