OrbCharts Docs
Docs
Home
Github
  • English
  • 繁體中文
Docs
Home
Github
  • English
  • 繁體中文
  • Guide
  • Basic Concepts

    • 6 Data Formats
    • Core Technologies
  • Get Started !

    • Installation
    • Examples
  • Basic Usage

    • Creating Charts
    • Using Presets
    • Drawing Charts
    • Data Labels
  • Chart API

    • plugins$
    • data$
    • chartParams$
    • dataFormatter$
    • event$
    • destroy()
  • Plugins

    • Create Plugin
    • Series

      • Bubbles
      • Pie
      • PieEventTexts
      • PieLabels
      • Rose
      • RoseLabels
      • SeriesLegend
      • SeriesTooltip
    • Grid

      • Bars
      • BarsPN
      • BarsTriangle
      • Dots
      • GridLegend
      • GridTooltip
      • GroupAux
      • GroupAxis
      • GroupZoom
      • Lines
      • LineAreas
      • StackedBars
      • StackedValueAxis
      • ValueAxis
    • MultiGrid

      • MultiBars
      • MultiBarsTriangle
      • MultiDots
      • MultiGridLegend
      • MultiGridTooltip
      • MultiGroupAxis
      • MultiStackedBars
      • MultiStackedValueAxis
      • MultiValueAxis
      • OverlappingValueAxes
      • OverlappingStackedValueAxes
    • MultiValue

      • MultiValueLegend
      • MultiValueTooltip
      • OrdinalAux
      • OrdinalAxis
      • OrdinalBubbles
      • OrdinalZoom
      • RacingBars
      • RacingCounterTexts
      • RacingValueAxis
      • Scatter
      • ScatterBubbles
      • XYAux
      • XYAxes
      • XYZoom
    • Relationship

      • ForceDirected
      • ForceDirectedBubbles
      • RelationshipLegend
      • RelationshipTooltip
    • Tree

      • TreeLegend
      • TreeMap
      • TreeTooltip

plugins$

The API plugins$ is one of the essential APIs for drawing charts. You can add one or more (at least one) Plugin to draw the chart.

In OrbCharts, a "Plugin" refers to an object used to draw SVG graphic elements. A chart is composed of one or more Plugins. The "Plugins" that can be used by the 6 types of chart objects must use the same data format. For example, Pie and PieLabels both belong to Series, so they cannot be used in chart objects created by the GridChart chart category, but can only be used in chart objects created by SeriesChart.

TIP

You can go to the Playground page to select the required chart type and obtain the required Plugins from the sample code.

Syntax

The syntax for creating data is chart.plugins$.next([plugin])

Example:

chart.plugins$.next([new Pie(), new PieLabels()])

Parameters

Plugin[]

  • Type: Array<PluginEntity<T extends ChartType, PluginName, PluginParams>>

  • Description: An array format of "Plugin objects" (multiple Plugin objects can be placed).