You are here

function easychart_libraries_info in Easychart 7.3

Same name and namespace in other branches
  1. 7 easychart.module \easychart_libraries_info()
  2. 7.2 easychart.module \easychart_libraries_info()

Implements hook_libraries_info().

For defining external libraries.

File

./easychart.module, line 276
Easychart module file.

Code

function easychart_libraries_info() {
  $libraries['highcharts'] = array(
    'name' => 'Highcharts',
    'vendor url' => 'http://www.highcharts.com',
    'download url' => 'http://www.highcharts.com/download',
    'recommended' => array(
      'version' => '4.2.7',
      // 4.2.x and up
      'uri' => 'http://code.highcharts.com/zips/Highcharts-4.2.7.zip',
    ),
    'version arguments' => array(
      'file' => 'js/highcharts.js',
      // Could be any file with version info
      'pattern' => '/Highcharts JS v(\\d\\.\\d\\.\\d)/',
      'lines' => 2,
    ),
    'files' => array(
      'js' => array(
        'js/highcharts.js',
        'js/highcharts-3d.js',
        'js/highcharts-more.js',
        'js/modules/data.js',
        'js/modules/funnel.js',
        'js/modules/heatmap.js',
        'js/modules/solid-gauge.js',
        'js/modules/treemap.js',
        'js/modules/boost.js',
        'js/modules/exporting.js',
        'js/modules/no-data-to-display.js',
      ),
    ),
  );
  $libraries['easychart'] = array(
    'name' => 'Easychart',
    'vendor url' => 'http://www.easychart.org',
    'download url' => 'https://github.com/bestuurszaken/easychart',
    'recommended' => array(
      'version' => '3.1.0',
      'uri' => 'https://github.com/bestuurszaken/easychart/archive/v3.1.3.zip',
    ),
    'latest' => array(
      'version' => 'master',
      'uri' => 'https://github.com/bestuurszaken/easychart/archive/master.zip',
    ),
    'version arguments' => array(
      'file' => 'dist/ec.min.js',
      'pattern' => '/@version\\sv(\\d\\.\\d\\.\\d)/',
      'lines' => 3,
    ),
    'files' => array(
      'js' => array(
        'dist/ec.min.js',
      ),
    ),
    'variants' => array(
      // Only minimal functionality to render a chart.
      'render' => array(
        'files' => array(
          'js' => array(
            'dist/ec.render.min.js',
          ),
        ),
      ),
    ),
  );
  return $libraries;
}