You are here

function _seotools_reports_liquid_chart in Drupal SEO Tools 7

Same name and namespace in other branches
  1. 6 seotools.report.inc \_seotools_reports_liquid_chart()
1 call to _seotools_reports_liquid_chart()
seotools_dashboard_analytics_box in ./seotools.report.inc

File

./seotools.report.inc, line 344

Code

function _seotools_reports_liquid_chart($id, $title, $data, $dates) {
  $chart = array(
    '#chart_id' => $id,
    '#title' => '',
    '#type' => CHART_TYPE_LINE,
    '#size' => chart_size(600, 150),
    '#adjust_resolution' => TRUE,
    '#data_colors' => chart_data_colors(array(
      '0077CC',
    )),
    '#line_styles' => array(
      chart_line_style(3, 10, 0),
    ),
    '#shape_markers' => array(
      chart_shape_marker(0, -1, 'o', 9, '0077CC'),
    ),
    '#grid_lines' => chart_grid_lines(0, 20, 1, 3),
  );
  $chart['#data'] = $data;
  $chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][0][] = chart_mixed_axis_range_label(0, max($data));
  foreach ($dates as $date) {
    $chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label($date);
  }
  return $chart;
}