You are here

function quant_y_range in Quant 6

Add an y-axis range to the chart

Parameters

&$quant: A quant object

$min: The minimum value for the y-axis

$max: The maximum value for the y-axis

3 calls to quant_y_range()
_quant_generate_chart_count in includes/chart.inc
Take formatted data for a count chart and convert to a format that the charts can understand
_quant_generate_chart_multiple in includes/chart.inc
Take formatted data for a multi-point chart and convert to a format that the charts can understand
_quant_generate_chart_single in includes/chart.inc
Take formatted data for a single-point chart and convert to a format that the charts can understand

File

includes/chart.inc, line 282
Chart building functions

Code

function quant_y_range(&$quant, $min, $max) {
  $max = max($max, 1);

  // Prevent a max that's zero
  $quant->chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][0][] = chart_mixed_axis_range_label($min, $max);
}