function chart_mixed_axis_label in Google Chart Tools: Image Charts 7
Same name and namespace in other branches
- 5 chart.module \chart_mixed_axis_label()
- 6 chart.module \chart_mixed_axis_label()
Create a mixed axis label.
Labels must be nested by axis and index:
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][0][] = chart_mixed_axis_label(t('Monday'));
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][0][] = chart_mixed_axis_label(t('Tuesday'));
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][0][] = chart_mixed_axis_label(t('Wednesday'));
$chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][1][] = chart_mixed_axis_range_label(0, 50);
$chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][2][] = chart_mixed_axis_label(t('Min'));
$chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][2][] = chart_mixed_axis_label(t('Max'));
Parameters
mixed $label:
- string: A single label
- array: An array of label strings, or an assoc array containing #label and #position
int $position: (optional) An integer between 0 - 100 representing where the label should appear along the axis. 0 representing bottom and left, 100 representing top and right. When one label within a given set is given a position, the remaining labels in the set must have a position.
Return value
array
File
- ./
chart.module, line 965 - Provides primary Drupal hook implementations.
Code
function chart_mixed_axis_label($label, $position = NULL) {
return array(
'#label' => $label,
'#position' => $position,
);
}