igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
85 lines (82 loc) • 2.3 kB
JavaScript
import { IgrNumericAxisBase } from "./igr-numeric-axis-base";
import { NumericRadiusAxis } from "./NumericRadiusAxis";
/**
* Represents a IgxDataChartComponent radius axis for polar and radial series.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource} >
*
* <IgrCategoryAngleAxis name="angleAxis" label="Department" />
* <IgrNumericRadiusAxis name="radiusAxis" />
*
* </IgrDataChart>
* ```
*
* ```ts
* this.series1.angleAxisName = "AngleAxis";
* this.series1.valueAxisName = "numericYAxis";
* ```
*/
export class IgrNumericRadiusAxis extends IgrNumericAxisBase {
createImplementation() {
return new NumericRadiusAxis();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
/**
* Checks if the axis is of radial axis type
*
* ```ts
* let isRadial: boolean = this.series.isRadial;
* ```
*/
get isRadial() {
return this.i.dl;
}
/**
* Defines the percentage of the maximum radius extent to use as the maximum radius. Should be
* a value between 0.0 and 1.0.
*/
get radiusExtentScale() {
return this.i.sl;
}
set radiusExtentScale(v) {
this.i.sl = +v;
}
/**
* Defines the percentage of the maximum radius extent to leave blank at the center of the chart. Should be
* a value between 0.0 and 1.0.
*/
get innerRadiusExtentScale() {
return this.i.sk;
}
set innerRadiusExtentScale(v) {
this.i.sk = +v;
}
/**
* Returns a world coordinates radius length (0 - 0.5) from a raw axis value.
* @param unscaledValue * The raw axis value.
*/
getScaledValue(unscaledValue) {
let iv = this.i.sh(unscaledValue);
return (iv);
}
/**
* Returns a raw axis value from the world coordinates radius length provided.
* @param scaledValue * The scaled world coordinates radius length.
*
* Class containing several properties which are used as parameters passed to scaling operations in a `SeriesViewer`.
*/
getUnscaledValue(scaledValue) {
let iv = this.i.sj(scaledValue);
return (iv);
}
}