You are here

charts.views.inc in Charts 6

Same filename and directory in other branches
  1. 7.2 views/charts.views.inc
  2. 7 views/charts.views.inc

@author Bruno Massa http://drupal.org/user/67164

Views integration with Charts.

File

views/charts.views.inc
View source
<?php

/**
 * @author Bruno Massa http://drupal.org/user/67164
 * @file
 * Views integration with Charts.
 */

/**
 * Implementation of hook_views_plugins().
 *
 * Define charts style for Views.
 */
function charts_views_plugins() {

  // Views support is only possible if Views Calc module is enabled. It
  // is responsible for turn the Views values into a aggregates.
  if (!module_exists('views_calc')) {
    return;
  }
  return array(
    'module' => 'charts',
    'style' => array(
      // Declare the charts style plugin
      'chart' => array(
        'handler' => 'charts_plugin_style_chart',
        'help' => t('Displays the content in several Chart styles.'),
        'path' => drupal_get_path('module', 'charts') . '/views',
        'parent' => 'parent',
        'title' => t('Chart'),
        'type' => 'normal',
        'uses fields' => TRUE,
        'uses options' => TRUE,
        'uses row plugin' => FALSE,
      ),
    ),
  );
}

Functions

Namesort descending Description
charts_views_plugins Implementation of hook_views_plugins().