igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
771 lines (765 loc) • 20.4 kB
JavaScript
import { HorizontalAlignment_$type } from "igniteui-react-core";
import { VerticalAlignment_$type } from "igniteui-react-core";
import { Visibility_$type } from "igniteui-react-core";
import { ValueAxisLabelLocation_$type } from "./ValueAxisLabelLocation";
import { AngleAxisLabelLocation_$type } from "./AngleAxisLabelLocation";
import { IgrDomainChart } from "./igr-domain-chart";
import { brushToString, stringToBrush, ensureBool, ensureEnum, arrayFindByName } from "igniteui-react-core";
/**
* Represents a base class for domain charts with X/Y axes
*/
export class IgrRadialBaseChart extends IgrDomainChart {
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
/**
* Gets or sets function which takes an context object and returns a formatted label for the X-axis.
*/
get angleAxisFormatLabel() {
return this.i.aak;
}
set angleAxisFormatLabel(v) {
this.i.aak = v;
}
/**
* Gets or sets function which takes a context object and returns a formatted label for the Y-axis.
*/
get valueAxisFormatLabel() {
return this.i.aal;
}
set valueAxisFormatLabel(v) {
this.i.aal = v;
}
/**
* Gets or sets the left margin of labels on the X-axis
*/
get angleAxisLabelLeftMargin() {
return this.i.abv;
}
set angleAxisLabelLeftMargin(v) {
this.i.abv = +v;
}
/**
* Gets or sets the top margin of labels on the X-axis
*/
get angleAxisLabelTopMargin() {
return this.i.abx;
}
set angleAxisLabelTopMargin(v) {
this.i.abx = +v;
}
/**
* Gets or sets the right margin of labels on the X-axis
*/
get angleAxisLabelRightMargin() {
return this.i.abw;
}
set angleAxisLabelRightMargin(v) {
this.i.abw = +v;
}
/**
* Gets or sets the bottom margin of labels on the X-axis
*/
get angleAxisLabelBottomMargin() {
return this.i.abu;
}
set angleAxisLabelBottomMargin(v) {
this.i.abu = +v;
}
/**
* Gets or sets the left margin of labels on the Y-axis
*/
get valueAxisLabelLeftMargin() {
return this.i.acg;
}
set valueAxisLabelLeftMargin(v) {
this.i.acg = +v;
}
/**
* Gets or sets the top margin of labels on the Y-axis
*/
get valueAxisLabelTopMargin() {
return this.i.aci;
}
set valueAxisLabelTopMargin(v) {
this.i.aci = +v;
}
/**
* Gets or sets the right margin of labels on the Y-axis
*/
get valueAxisLabelRightMargin() {
return this.i.ach;
}
set valueAxisLabelRightMargin(v) {
this.i.ach = +v;
}
/**
* Gets or sets the bottom margin of labels on the Y-axis
*/
get valueAxisLabelBottomMargin() {
return this.i.acf;
}
set valueAxisLabelBottomMargin(v) {
this.i.acf = +v;
}
/**
* Gets or sets color of labels on the X-axis
*/
get angleAxisLabelTextColor() {
return brushToString(this.i.agn);
}
set angleAxisLabelTextColor(v) {
this.i.agn = stringToBrush(v);
}
/**
* Gets or sets color of labels on the Y-axis
*/
get valueAxisLabelTextColor() {
return brushToString(this.i.agu);
}
set valueAxisLabelTextColor(v) {
this.i.agu = stringToBrush(v);
}
/**
* Gets the actual color of labels on the X-axis
*/
get actualAngleAxisLabelTextColor() {
return brushToString(this.i.agl);
}
set actualAngleAxisLabelTextColor(v) {
this.i.agl = stringToBrush(v);
}
/**
* Gets the actual color of labels on the Y-axis
*/
get actualValueAxisLabelTextColor() {
return brushToString(this.i.agm);
}
set actualValueAxisLabelTextColor(v) {
this.i.agm = stringToBrush(v);
}
/**
* Gets or sets the margin around a title on the X-axis
*/
get angleAxisTitleMargin() {
return this.i.ab6;
}
set angleAxisTitleMargin(v) {
this.i.ab6 = +v;
}
/**
* Gets or sets the margin around a title on the Y-axis
*/
get valueAxisTitleMargin() {
return this.i.acr;
}
set valueAxisTitleMargin(v) {
this.i.acr = +v;
}
/**
* Gets or sets the left margin of a title on the X-axis
*/
get angleAxisTitleLeftMargin() {
return this.i.ab5;
}
set angleAxisTitleLeftMargin(v) {
this.i.ab5 = +v;
}
/**
* Gets or sets the left margin of a title on the Y-axis
*/
get valueAxisTitleLeftMargin() {
return this.i.acq;
}
set valueAxisTitleLeftMargin(v) {
this.i.acq = +v;
}
/**
* Gets or sets the top margin of a title on the X-axis
*/
get angleAxisTitleTopMargin() {
return this.i.ab8;
}
set angleAxisTitleTopMargin(v) {
this.i.ab8 = +v;
}
/**
* Gets or sets the top margin of a title on the Y-axis
*/
get valueAxisTitleTopMargin() {
return this.i.act;
}
set valueAxisTitleTopMargin(v) {
this.i.act = +v;
}
/**
* Gets or sets the right margin of a title on the X-axis
*/
get angleAxisTitleRightMargin() {
return this.i.ab7;
}
set angleAxisTitleRightMargin(v) {
this.i.ab7 = +v;
}
/**
* Gets or sets the right margin of a title on the Y-axis
*/
get valueAxisTitleRightMargin() {
return this.i.acs;
}
set valueAxisTitleRightMargin(v) {
this.i.acs = +v;
}
/**
* Gets or sets the bottom margin of a title on the X-axis
*/
get angleAxisTitleBottomMargin() {
return this.i.ab4;
}
set angleAxisTitleBottomMargin(v) {
this.i.ab4 = +v;
}
/**
* Gets or sets the bottom margin of a title on the Y-axis
*/
get valueAxisTitleBottomMargin() {
return this.i.acp;
}
set valueAxisTitleBottomMargin(v) {
this.i.acp = +v;
}
/**
* Gets or sets color of title on the X-axis
*/
get angleAxisTitleTextColor() {
return brushToString(this.i.agt);
}
set angleAxisTitleTextColor(v) {
this.i.agt = stringToBrush(v);
}
/**
* Gets or sets color of title on the Y-axis
*/
get valueAxisTitleTextColor() {
return brushToString(this.i.ag0);
}
set valueAxisTitleTextColor(v) {
this.i.ag0 = stringToBrush(v);
}
/**
* Gets or sets CSS font property for labels on X-axis
*/
get angleAxisLabelTextStyle() {
return this.i.adm;
}
set angleAxisLabelTextStyle(v) {
this.i.adm = v;
}
/**
* Gets or sets CSS font property for labels on Y-axis
*/
get valueAxisLabelTextStyle() {
return this.i.aes;
}
set valueAxisLabelTextStyle(v) {
this.i.aes = v;
}
/**
* Gets or sets CSS font property for title on X-axis
*/
get angleAxisTitleTextStyle() {
return this.i.aea;
}
set angleAxisTitleTextStyle(v) {
this.i.aea = v;
}
/**
* Gets or sets CSS font property for title on Y-axis
*/
get valueAxisTitleTextStyle() {
return this.i.afg;
}
set valueAxisTitleTextStyle(v) {
this.i.afg = v;
}
/**
* Gets or sets the format for labels along the X-axis.
*/
get angleAxisLabel() {
return this.i.acw;
}
set angleAxisLabel(v) {
this.i.acw = v;
}
/**
* Gets or sets the property or string from which the labels are derived.
*/
get valueAxisLabel() {
return this.i.acx;
}
set valueAxisLabel(v) {
this.i.acx = v;
}
/**
* Gets or sets the color to apply to major gridlines along the X-axis.
*/
get angleAxisMajorStroke() {
return brushToString(this.i.ago);
}
set angleAxisMajorStroke(v) {
this.i.ago = stringToBrush(v);
}
/**
* Gets or sets the color to apply to major gridlines along the Y-axis.
*/
get valueAxisMajorStroke() {
return brushToString(this.i.agv);
}
set valueAxisMajorStroke(v) {
this.i.agv = stringToBrush(v);
}
/**
* Gets or sets the thickness to apply to major gridlines along the X-axis.
*/
get angleAxisMajorStrokeThickness() {
return this.i.aby;
}
set angleAxisMajorStrokeThickness(v) {
this.i.aby = +v;
}
/**
* Gets or sets the thickness to apply to major gridlines along the Y-axis.
*/
get valueAxisMajorStrokeThickness() {
return this.i.acj;
}
set valueAxisMajorStrokeThickness(v) {
this.i.acj = +v;
}
/**
* Gets or sets the thickness to apply to minor gridlines along the X-axis.
*/
get angleAxisMinorStrokeThickness() {
return this.i.abz;
}
set angleAxisMinorStrokeThickness(v) {
this.i.abz = +v;
}
/**
* Gets or sets the thickness to apply to minor gridlines along the Y-axis.
*/
get valueAxisMinorStrokeThickness() {
return this.i.ack;
}
set valueAxisMinorStrokeThickness(v) {
this.i.ack = +v;
}
/**
* Gets or sets the color to apply to stripes along the X-axis.
*/
get angleAxisStrip() {
return brushToString(this.i.agq);
}
set angleAxisStrip(v) {
this.i.agq = stringToBrush(v);
}
/**
* Gets or sets the color to apply to stripes along the Y-axis.
*/
get valueAxisStrip() {
return brushToString(this.i.agx);
}
set valueAxisStrip(v) {
this.i.agx = stringToBrush(v);
}
/**
* Gets or sets the color to apply to the X-axis line.
*/
get angleAxisStroke() {
return brushToString(this.i.agr);
}
set angleAxisStroke(v) {
this.i.agr = stringToBrush(v);
}
/**
* Gets or sets the color to apply to the Y-axis line.
*/
get valueAxisStroke() {
return brushToString(this.i.agy);
}
set valueAxisStroke(v) {
this.i.agy = stringToBrush(v);
}
/**
* Gets or sets the thickness to apply to the X-axis line.
*/
get angleAxisStrokeThickness() {
return this.i.ab0;
}
set angleAxisStrokeThickness(v) {
this.i.ab0 = +v;
}
/**
* Gets or sets the thickness to apply to the Y-axis line.
*/
get valueAxisStrokeThickness() {
return this.i.acl;
}
set valueAxisStrokeThickness(v) {
this.i.acl = +v;
}
/**
* Gets or sets the length of tickmarks along the X-axis.
*/
get angleAxisTickLength() {
return this.i.ab1;
}
set angleAxisTickLength(v) {
this.i.ab1 = +v;
}
/**
* Gets or sets the length of tickmarks along the Y-axis.
*/
get valueAxisTickLength() {
return this.i.acm;
}
set valueAxisTickLength(v) {
this.i.acm = +v;
}
/**
* Gets or sets the color to apply to tickmarks along the X-axis.
*/
get angleAxisTickStroke() {
return brushToString(this.i.ags);
}
set angleAxisTickStroke(v) {
this.i.ags = stringToBrush(v);
}
/**
* Gets or sets the color to apply to tickmarks along the Y-axis.
*/
get valueAxisTickStroke() {
return brushToString(this.i.agz);
}
set valueAxisTickStroke(v) {
this.i.agz = stringToBrush(v);
}
/**
* Gets or sets the thickness to apply to tickmarks along the X-axis.
*/
get angleAxisTickStrokeThickness() {
return this.i.ab2;
}
set angleAxisTickStrokeThickness(v) {
this.i.ab2 = +v;
}
/**
* Gets or sets the thickness to apply to tickmarks along the Y-axis.
*/
get valueAxisTickStrokeThickness() {
return this.i.acn;
}
set valueAxisTickStrokeThickness(v) {
this.i.acn = +v;
}
/**
* Gets or sets the Text to display below the X-axis.
*/
get angleAxisTitle() {
return this.i.ad1;
}
set angleAxisTitle(v) {
this.i.ad1 = v;
}
/**
* Gets or sets the Text to display to the left of the Y-axis.
*/
get valueAxisTitle() {
return this.i.ae7;
}
set valueAxisTitle(v) {
this.i.ae7 = v;
}
/**
* Gets or sets the color to apply to minor gridlines along the X-axis.
*/
get angleAxisMinorStroke() {
return brushToString(this.i.agp);
}
set angleAxisMinorStroke(v) {
this.i.agp = stringToBrush(v);
}
/**
* Gets or sets the color to apply to minor gridlines along the Y-axis.
*/
get valueAxisMinorStroke() {
return brushToString(this.i.agw);
}
set valueAxisMinorStroke(v) {
this.i.agw = stringToBrush(v);
}
/**
* Gets or sets the angle of rotation for labels along the X-axis.
*/
get angleAxisLabelAngle() {
return this.i.abt;
}
set angleAxisLabelAngle(v) {
this.i.abt = +v;
}
/**
* Gets or sets the angle of rotation for labels along the Y-axis.
*/
get valueAxisLabelAngle() {
return this.i.ace;
}
set valueAxisLabelAngle(v) {
this.i.ace = +v;
}
/**
* Gets or sets the distance between the X-axis and the bottom of the chart.
*/
get angleAxisExtent() {
return this.i.abs;
}
set angleAxisExtent(v) {
this.i.abs = +v;
}
/**
* Gets or sets the distance between the Y-axis and the left edge of the chart.
*/
get valueAxisExtent() {
return this.i.acd;
}
set valueAxisExtent(v) {
this.i.acd = +v;
}
/**
* Gets or sets the angle of rotation for the X-axis title.
*/
get angleAxisTitleAngle() {
return this.i.ab3;
}
set angleAxisTitleAngle(v) {
this.i.ab3 = +v;
}
/**
* Gets or sets the angle of rotation for the Y-axis title.
*/
get valueAxisTitleAngle() {
return this.i.aco;
}
set valueAxisTitleAngle(v) {
this.i.aco = +v;
}
/**
* Gets or sets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart.
*/
get angleAxisInverted() {
return this.i.aas;
}
set angleAxisInverted(v) {
this.i.aas = ensureBool(v);
}
/**
* Gets or sets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart.
*/
get valueAxisInverted() {
return this.i.aat;
}
set valueAxisInverted(v) {
this.i.aat = ensureBool(v);
}
/**
* Gets or sets Horizontal alignment of the X-axis title.
*/
get angleAxisTitleAlignment() {
return this.i.af3;
}
set angleAxisTitleAlignment(v) {
this.i.af3 = ensureEnum(HorizontalAlignment_$type, v);
}
/**
* Gets or sets Vertical alignment of the Y-axis title.
*/
get valueAxisTitleAlignment() {
return this.i.ag6;
}
set valueAxisTitleAlignment(v) {
this.i.ag6 = ensureEnum(VerticalAlignment_$type, v);
}
/**
* Gets or sets Horizontal alignment of X-axis labels.
*/
get angleAxisLabelHorizontalAlignment() {
return this.i.af2;
}
set angleAxisLabelHorizontalAlignment(v) {
this.i.af2 = ensureEnum(HorizontalAlignment_$type, v);
}
/**
* Gets or sets Horizontal alignment of Y-axis labels.
*/
get valueAxisLabelHorizontalAlignment() {
return this.i.af4;
}
set valueAxisLabelHorizontalAlignment(v) {
this.i.af4 = ensureEnum(HorizontalAlignment_$type, v);
}
/**
* Gets or sets Vertical alignment of X-axis labels.
*/
get angleAxisLabelVerticalAlignment() {
return this.i.ag4;
}
set angleAxisLabelVerticalAlignment(v) {
this.i.ag4 = ensureEnum(VerticalAlignment_$type, v);
}
/**
* Gets or sets Vertical alignment of Y-axis labels.
*/
get valueAxisLabelVerticalAlignment() {
return this.i.ag5;
}
set valueAxisLabelVerticalAlignment(v) {
this.i.ag5 = ensureEnum(VerticalAlignment_$type, v);
}
/**
* Gets or sets Visibility of X-axis labels.
*/
get angleAxisLabelVisibility() {
return this.i.ag9;
}
set angleAxisLabelVisibility(v) {
this.i.ag9 = ensureEnum(Visibility_$type, v);
}
/**
* Gets or sets Visibility of Y-axis labels.
*/
get valueAxisLabelVisibility() {
return this.i.aha;
}
set valueAxisLabelVisibility(v) {
this.i.aha = ensureEnum(Visibility_$type, v);
}
/**
* Gets or sets location of Y-axis labels, relative to the plot area.
*/
get valueAxisLabelLocation() {
return this.i.aap;
}
set valueAxisLabelLocation(v) {
this.i.aap = ensureEnum(ValueAxisLabelLocation_$type, v);
}
/**
* Gets or sets location of X-axis labels, relative to the plot area.
*/
get angleAxisLabelLocation() {
return this.i.aaf;
}
set angleAxisLabelLocation(v) {
this.i.aaf = ensureEnum(AngleAxisLabelLocation_$type, v);
}
/**
* Gets or sets the format string for the X axis label.
*/
get angleAxisLabelFormat() {
return this.i.add;
}
set angleAxisLabelFormat(v) {
this.i.add = v;
}
/**
* Gets or sets the format specifiers to use with the AngleAxisLabelFormat string.
*/
get angleAxisLabelFormatSpecifiers() {
return this.i.aac;
}
set angleAxisLabelFormatSpecifiers(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.aac = v;
}
/**
* Gets or sets the format string for the Y axis label.
*/
get valueAxisLabelFormat() {
return this.i.aej;
}
set valueAxisLabelFormat(v) {
this.i.aej = v;
}
/**
* Gets or sets the format specifiers to use with the ValueAxisLabelFormat string.
*/
get valueAxisLabelFormatSpecifiers() {
return this.i.aad;
}
set valueAxisLabelFormatSpecifiers(v) {
if (v && !Array.isArray(v) && typeof (v) == "string") {
const re = /\s*(?:,|\s|$)\s*/gm;
v = v.split(re);
}
this.i.aad = v;
}
findByName(name) {
var baseResult = super.findByName(name);
if (baseResult) {
return baseResult;
}
if (this.angleAxisLabelFormatSpecifiers != null && arrayFindByName(this.angleAxisLabelFormatSpecifiers, name)) {
return arrayFindByName(this.angleAxisLabelFormatSpecifiers, name);
}
if (this.valueAxisLabelFormatSpecifiers != null && arrayFindByName(this.valueAxisLabelFormatSpecifiers, name)) {
return arrayFindByName(this.valueAxisLabelFormatSpecifiers, name);
}
return null;
}
/**
* Called by the UI framework to provide a UI container for rendering this control.
* @param container * The UI container element.
*/
provideContainer(container) {
this.i.provideContainer(container);
}
/**
* Converts the given visual location to a data value.
* @param unscaledValue * The x-coordinate of the location to scale.
*/
getScaledAngle(unscaledValue) {
let iv = this.i.ab9(unscaledValue);
return (iv);
}
/**
* Converts the given data value to a visual location.
* @param scaledValue * The data value to un-scale.
*/
getUnscaledAngle(scaledValue) {
let iv = this.i.acb(scaledValue);
return (iv);
}
/**
* Converts the given visual location to a data value.
* @param unscaledValue * The y-coordinate of the location to scale.
*/
getScaledValue(unscaledValue) {
let iv = this.i.aca(unscaledValue);
return (iv);
}
/**
* Converts the given data value to a visual location.
* @param scaledValue * The data value to un-scale.
*/
getUnscaledValue(scaledValue) {
let iv = this.i.acc(scaledValue);
return (iv);
}
}