You are here

public function VisualizationHandlerInterface::render in Visualization API 7

Renders a chart with a given HTML identifier, data set and options.

Parameters

$chart_id: A unique identifier associated with the chart. The HTML of the chart is also contained within a div with this identifier.

$data: An array of rows. Each row is an associative array with as key the internal field name.

$options: An associative array that contains options to be used when rendering, users can pass additional options for specific charting library implementations.

Some default information is: - title: the label of the chart - type: the internal name of the type of the chart; default types are line, pie and column. Specific charting libraries are welcome to implement custom chart types as they please. - fields: an associative array of internal field names and their labels. - xAxis: options concerning the x-axis (if appropriate) - yAxis: options concerning the y-axis (if appropriate)

Return value

A string that will be the body of the chart div.

2 methods override VisualizationHandlerInterface::render()
GoogleVisualizationAPIHandler::render in includes/plugins/google_visualization_api.inc
Renders a chart using the Google Visualization API.
HighchartsHandler::render in includes/plugins/highcharts.inc
Renders a chart using Highcharts.

File

includes/interfaces.inc, line 37
Provides interfaces used by the module and its plugins.

Class

VisualizationHandlerInterface
@file Provides interfaces used by the module and its plugins.

Code

public function render($chart_id, $data, $options);