igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
252 lines (251 loc) • 8.08 kB
JavaScript
import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode";
import { PenLineCap_$type } from "igniteui-react-core";
import { IgrSeries } from "./igr-series";
import { ensureBool, fromPoint, toPoint, ensureEnum, toDoubleCollection, fromDoubleCollection } from "igniteui-react-core";
/**
* Represents the base class for annotation layer types. Annotations will usually disable some of the default hover/touch behaviors of the chart when they are introduced to the series collection.
* In return they provide some valuable information as the cursor is moved by hovering over the chart, or performing a press-hold-drag interaction in touch mode.
*/
export class IgrAnnotationLayer extends IgrSeries {
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
/**
* Gets or sets whether this series should take up an index for auto brush coloring.
*/
get useIndex() {
return this.i.xv;
}
set useIndex(v) {
this.i.xv = ensureBool(v);
}
/**
* Gets or sets whether this series interacts with the chart legend.
*/
get useLegend() {
return this.i.xw;
}
set useLegend(v) {
this.i.xw = ensureBool(v);
}
/**
* Gets or sets the world position to use instead of the pointer position for this annotation layer. If you set this value, rather than responding to the pointer, this layer will be fixed on the provided world position.
* A world position has x and y values that range from 0 to 1 that represent the global position of the cursor relative to the entire ranges of the axes. The default of (NaN, NaN) means that the layer should react to pointer movement.
*/
get cursorPosition() {
return fromPoint(this.i.aae);
}
set cursorPosition(v) {
this.i.aae = toPoint(v);
}
/**
* Gets or sets whether the series viewer's default crosshair should be disabled by the presence of this layer.
*/
get isDefaultCrosshairDisabled() {
return this.i.xq;
}
set isDefaultCrosshairDisabled(v) {
this.i.xq = ensureBool(v);
}
/**
* Gets whether or not the default crosshair behavior is disabled.
*/
get isDefaultCrosshairBehaviorDisabled() {
return this.i.e3;
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get appearanceMode() {
return this.i.xc;
}
set appearanceMode(v) {
this.i.xc = ensureEnum(AnnotationAppearanceMode_$type, v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get actualAppearanceMode() {
return this.i.w9;
}
set actualAppearanceMode(v) {
this.i.w9 = ensureEnum(AnnotationAppearanceMode_$type, v);
}
/**
* Gets or sets the percentage amount to shift the appearance mode by. Value must range between -1.0 to 1.0.
*/
get shiftAmount() {
return this.i.x9;
}
set shiftAmount(v) {
this.i.x9 = +v;
}
/**
* Gets or sets the percentage amount to shift the appearance mode by. Value must range between -1.0 to 1.0.
*/
get actualShiftAmount() {
return this.i.xy;
}
set actualShiftAmount(v) {
this.i.xy = +v;
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get horizontalAppearanceMode() {
return this.i.xj;
}
set horizontalAppearanceMode(v) {
this.i.xj = ensureEnum(AnnotationAppearanceMode_$type, v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get actualHorizontalAppearanceMode() {
return this.i.xa;
}
set actualHorizontalAppearanceMode(v) {
this.i.xa = ensureEnum(AnnotationAppearanceMode_$type, v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get verticalAppearanceMode() {
return this.i.xk;
}
set verticalAppearanceMode(v) {
this.i.xk = ensureEnum(AnnotationAppearanceMode_$type, v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get actualVerticalAppearanceMode() {
return this.i.xb;
}
set actualVerticalAppearanceMode(v) {
this.i.xb = ensureEnum(AnnotationAppearanceMode_$type, v);
}
/**
* Gets or sets the percentage amount to shift the appearance mode by. Value must range between -1.0 to 1.0.
*/
get horizontalShiftAmount() {
return this.i.x8;
}
set horizontalShiftAmount(v) {
this.i.x8 = +v;
}
/**
* Gets or sets the percentage amount to shift the appearance mode by. Value must range between -1.0 to 1.0.
*/
get actualHorizontalShiftAmount() {
return this.i.xx;
}
set actualHorizontalShiftAmount(v) {
this.i.xx = +v;
}
/**
* Gets or sets the percentage amount to shift the appearance mode by. Value must range between -1.0 to 1.0.
*/
get verticalShiftAmount() {
return this.i.ya;
}
set verticalShiftAmount(v) {
this.i.ya = +v;
}
/**
* Gets or sets the percentage amount to shift the appearance mode by. Value must range between -1.0 to 1.0.
*/
get actualVerticalShiftAmount() {
return this.i.xz;
}
set actualVerticalShiftAmount(v) {
this.i.xz = +v;
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get horizontalDashArray() {
return fromDoubleCollection(this.i.aaa);
}
set horizontalDashArray(v) {
this.i.aaa = toDoubleCollection(v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get actualHorizontalDashArray() {
return fromDoubleCollection(this.i.z2);
}
set actualHorizontalDashArray(v) {
this.i.z2 = toDoubleCollection(v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get verticalDashArray() {
return fromDoubleCollection(this.i.aab);
}
set verticalDashArray(v) {
this.i.aab = toDoubleCollection(v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get actualVerticalDashArray() {
return fromDoubleCollection(this.i.z3);
}
set actualVerticalDashArray(v) {
this.i.z3 = toDoubleCollection(v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get actualDashArray() {
return fromDoubleCollection(this.i.z1);
}
set actualDashArray(v) {
this.i.z1 = toDoubleCollection(v);
}
/**
* Gets or sets the mode used for shifting the annotation layer color based on the target series.
*/
get actualDashCap() {
return this.i.aac;
}
set actualDashCap(v) {
this.i.aac = ensureEnum(PenLineCap_$type, v);
}
/**
* Gets if the series uses an index, which can be used to auto-assign it a color.
*/
get isIndexed() {
return this.i.fh;
}
/**
* Gets if the series should appear in any legends.
*/
get isUsableInLegend() {
return this.i.isUsableInLegend;
}
/**
* Gets whether this series is an annotation layer.
*/
get isAnnotationLayer() {
return this.i.eu;
}
/**
* Gets or sets whether this layer renders as an overlay or not.
*/
get shouldRenderAsOverlay() {
return this.i.xu;
}
set shouldRenderAsOverlay(v) {
this.i.xu = ensureBool(v);
}
}