You are here

interface ChartInterface in Charts 8.4

Same name and namespace in other branches
  1. 5.0.x src/Plugin/chart/Library/ChartInterface.php \Drupal\charts\Plugin\chart\Library\ChartInterface

Defines an interface for Chart plugins.

Hierarchy

Expanded class hierarchy of ChartInterface

All classes that implement ChartInterface

4 files declare their use of ChartInterface
Chart.php in src/Element/Chart.php
ChartDataCollectorTable.php in src/Element/ChartDataCollectorTable.php
ChartsPluginStyleChart.php in src/Plugin/views/style/ChartsPluginStyleChart.php
TypeManager.php in src/TypeManager.php

File

src/Plugin/chart/Library/ChartInterface.php, line 12

Namespace

Drupal\charts\Plugin\chart\Library
View source
interface ChartInterface extends PluginInspectionInterface, PluginFormInterface, ConfigurableInterface {

  /**
   * Used to define a single axis.
   *
   * Constant used in chartsTypeInfo() to declare chart types with a
   * single axis. For example a pie chart only has a single dimension.
   */
  const SINGLE_AXIS = 'y_only';

  /**
   * Used to define a dual axis.
   *
   * Constant used in chartsTypeInfo() to declare chart types with a dual
   * axes. Most charts use this type of data, meaning multiple categories each
   * have multiple values. This type of data is usually represented as a table.
   */
  const DUAL_AXIS = 'xy';

  /**
   * Pre render.
   *
   * @param array $element
   *   The element.
   *
   * @return array
   *   The chart element.
   */
  public function preRender(array $element);

  /**
   * Return the name of the chart.
   *
   * @return string
   *   Returns the name as a string.
   */
  public function getChartName();

}

Members

Namesort descending Modifiers Type Description Overrides
ChartInterface::DUAL_AXIS constant Used to define a dual axis.
ChartInterface::getChartName public function Return the name of the chart. 1
ChartInterface::preRender public function Pre render. 5
ChartInterface::SINGLE_AXIS constant Used to define a single axis.
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2