You are here

function charts_graphs_open_flash_data in Charts and Graphs 6.2

Same name and namespace in other branches
  1. 7 apis/charts_graphs_open_flash/charts_graphs_open_flash.module \charts_graphs_open_flash_data()

Adds chart data as JSON.

Parameters

$cid: cache_id from which cache to retrieve the data

1 string reference to 'charts_graphs_open_flash_data'
charts_graphs_open_flash_menu in apis/charts_graphs_open_flash/charts_graphs_open_flash.module
Implementation of hook_menu().

File

apis/charts_graphs_open_flash/charts_graphs_open_flash.module, line 57
drupal module file implementing Open Flash Chart 2 charting.

Code

function charts_graphs_open_flash_data($cid = NULL) {
  $cache = cache_get($cid);
  if (!$cache) {
    drupal_not_found();
    exit;
  }
  $canvas = $cache->data;
  $chart = charts_graphs_get_graph('open-flash');
  $chart
    ->get_data_from_cache($cid);
  drupal_json($chart);
  exit;
}