Options
All
  • Public
  • Public/Protected
  • All
Menu
summary

The SciChartPieSurface is the root Pie and Donut Chart control in SciChart's High Performance Real-time JavaScript Chart Library

description

To create a Pie chart using SciChart, declare a SciChartPieSurface using SciChartPieSurface.create,

Next, add a pie segments by adding a PieSegment to the SciChartPieSurface.pieSegments collection.

You can create a donut chart by setting the SciChartPieSurface.holeRadius property.

You can add and configure a legend by setting the SciChartPieSurface.legend property.

remarks

It is possible to have more than one SciChartPieSurface on screen at the same time. SciChartPieSurfaces scale to fit the parent DIV where they are hosted. Use CSS to position the DIV.

Hierarchy

  • SciChartPieSurface

Implements

Index

Constructors

constructor

Properties

animate

animate: boolean = true

Readonly domCanvas2D

domCanvas2D: HTMLCanvasElement

Readonly domChartRoot

domChartRoot: HTMLDivElement

Readonly domDivContainer

domDivContainer: HTMLDivElement

Readonly domSvgContainer

domSvgContainer: SVGSVGElement

legend

An optional legend of type SciChartPieLegend which may be added to the Pie chart

Readonly pieSegments

summary

Gets the collection of IPieSegment - the pie segments or slices on this SciChartPieSurface

description

A SciChartPieSurface can have one to many Pie Segments. * Use this collection to add and remove series to the chart.

remarks

Adding a pie segment to the chart causes it to automatically redraw.

Accessors

holeRadius

  • get holeRadius(): number
  • set holeRadius(holeRadius: number): void
  • Gets or sets the hole radius, which allows you to create Donut charts instead of Pie.

    remarks

    See also EPieType which is required to change from Pie to Donut and holeRadiusSizingMode which defines whether the Donut hole is relative or absolute.

    Returns number

  • Gets or sets the hole radius, which allows you to create Donut charts instead of Pie.

    remarks

    See also EPieType which is required to change from Pie to Donut and holeRadiusSizingMode which defines whether the Donut hole is relative or absolute.

    Parameters

    • holeRadius: number

    Returns void

holeRadiusSizingMode

  • Gets or sets the hole radius size mode for Donut charts. See ESizingMode for a list of values

    remarks

    See also EPieType which is required to change from Pie to Donut, and holeRadius which sets the size of a Donut Chart hole

    Returns ESizingMode

  • Gets or sets the hole radius size mode for Donut charts. See ESizingMode for a list of values

    remarks

    See also EPieType which is required to change from Pie to Donut, and holeRadius which sets the size of a Donut Chart hole

    Parameters

    Returns void

pieType

  • Gets or sets the type of the pie chart. See EPieType for a list of values

    remarks

    See also holeRadius which is required for Donut charts and holeRadiusSizingMode which defines whether the Donut hole is relative or absolute.

    Returns EPieType

  • Gets or sets the type of the pie chart. See EPieType for a list of values

    remarks

    See also holeRadius which is required for Donut charts and holeRadiusSizingMode which defines whether the Donut hole is relative or absolute.

    Parameters

    Returns void

previousThemeProvider

  • Used internally - gets the previous IThemeProvider

    Returns IThemeProvider

seriesSpacing

  • get seriesSpacing(): number
  • set seriesSpacing(value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

themeProvider

  • Used internally - gets the previous IThemeProvider

    Returns IThemeProvider

Methods

applyTheme

Protected changeDomViewportSize

  • changeDomViewportSize(width: number, height: number): void
  • Changes the size of the DOM element where the SciChartSurfaceBase resides.

    Parameters

    • width: number
    • height: number

    Returns void

changeViewportSize

  • changeViewportSize(width: number, height: number): void

delete

  • delete(): void
  • Deletes native (WebAssembly) memory used by this type, after which it cannot be used.

    remarks

    Call .delete() before finishing with the object to ensure that WebAssmembly memory leaks do not occur.

    All elements within SciChart's High Performance Realtime JavaScript Charts which implement IDeletable must be deleted manually to free native (WebAssembly) memory

    Returns void

invalidateElement

  • invalidateElement(): void
  • Call invalidateElement() to trigger a redraw of the SciChartPieSurface. SciChart's rendering engine will schedule a redraw a the next time the renderer is free.

    Returns void

update

  • update(): void
  • Called internally - Updates and draws the Pie Chart

    Returns void

Static create

  • create(divElementId: string, width?: number, height?: number): Promise<SciChartPieSurface>
  • Creates a SciChartPieSurface and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.

    remarks

    This method is async and must be awaited

    Parameters

    • divElementId: string

      The Div Element ID where the SciChartPieSurface will reside

    • Default value width: number = 0

      Optional - the width of the SciChartPieSurface in pixels. By default SciChart will scale to fit the parent Div

    • Default value height: number = 0

      Optional - the height of the SciChartPieSurface in pixels. By default SciChart will scale to fit the parent Div

    Returns Promise<SciChartPieSurface>

Generated using TypeDoc