You are here

function chart_margins in Google Chart Tools: Image Charts 7

Same name and namespace in other branches
  1. 6 chart.module \chart_margins()

Margins

Parameters

int $left: Left margin size in pixels

int $right: Right margin size in pixels

int $top: Top margin size in pixels

int $bottom: Bottom margin size in pixels

int $legend_width: (optional) Width of legend margin

int $legend_height: (optional) Height of legend margin

Return value

array

File

./chart.module, line 1267
Provides primary Drupal hook implementations.

Code

function chart_margins($left, $right, $top, $bottom, $legend_width = NULL, $legend_height = NULL) {
  $margins = array(
    '#left_margin' => $left,
    '#right_margin' => $right,
    '#top_margin' => $top,
    '#bottom_margin' => $bottom,
  );
  if ($legend_width && $legend_height) {
    $margins['#legend_width'] = $legend_width;
    $margins['#legend_height'] = $legend_height;
  }
  return $margins;
}