Skip to content

Class: PolarPlot ​

Defined in: polar/polar.ts:93

A polar (r, θ) plot: concentric radial grid + angular spokes, WebGL data.

Constructors ​

Constructor ​

ts
new PolarPlot(container, options?): PolarPlot;

Defined in: polar/polar.ts:135

Parameters ​

ParameterType
containerHTMLElement
optionsPolarOptions

Returns ​

PolarPlot

Methods ​

addLine() ​

ts
addLine(opts): PolarSeries;

Defined in: polar/polar.ts:243

Parameters ​

ParameterType
optsPolarLineOptions

Returns ​

PolarSeries


addScatter() ​

ts
addScatter(opts): PolarSeries;

Defined in: polar/polar.ts:254

Parameters ​

ParameterType
optsPolarScatterOptions

Returns ​

PolarSeries


copyToClipboard() ​

ts
copyToClipboard(opts?): Promise<void>;

Defined in: polar/polar.ts:359

Copy the current view to the clipboard as a PNG.

Parameters ​

ParameterType
optsExportOptions

Returns ​

Promise<void>


destroy() ​

ts
destroy(): void;

Defined in: polar/polar.ts:373

Returns ​

void


downloadImage() ​

ts
downloadImage(
   filename?, 
   type?, 
opts?): Promise<void>;

Defined in: polar/polar.ts:354

Download the current view as an image (PNG by default).

Parameters ​

ParameterTypeDefault value
filenamestring"chart.png"
typestring"image/png"
optsExportOptions{}

Returns ​

Promise<void>


getRotation() ​

ts
getRotation(): number;

Defined in: polar/polar.ts:311

Current rotation offset in radians (CCW).

Returns ​

number


home() ​

ts
home(): void;

Defined in: polar/polar.ts:302

Reset zoom (r-domain) and rotation back to the initial view.

Returns ​

void


isOnScreen() ​

ts
isOnScreen(): boolean;

Defined in: polar/polar.ts:369

Whether this chart is currently on screen (plus a small margin), as offscreenCulling judges it. Photon already skips its own drawing while a chart is out of view; a streaming app should check this before regenerating data and calling setData, which uploads to the GPU regardless.

Returns ​

boolean


render() ​

ts
render(): void;

Defined in: polar/polar.ts:425

Returns ​

void


requestRender() ​

ts
requestRender(): void;

Defined in: polar/polar.ts:412

Returns ​

void


setRotation() ​

ts
setRotation(rad): void;

Defined in: polar/polar.ts:316

Set the rotation offset (radians, CCW) and redraw.

Parameters ​

ParameterType
radnumber

Returns ​

void


toBlob() ​

ts
toBlob(type?, opts?): Promise<Blob | null>;

Defined in: polar/polar.ts:349

Export the current view as a Blob (default PNG).

Parameters ​

ParameterTypeDefault value
typestring"image/png"
optsExportOptions{}

Returns ​

Promise<Blob | null>


toDataURL() ​

ts
toDataURL(type?, opts?): string;

Defined in: polar/polar.ts:344

Export the current view as a data URL (default PNG).

Parameters ​

ParameterTypeDefault value
typestring"image/png"
optsExportOptions{}

Returns ​

string

MIT licensed. WebGL2 required.