igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
62 lines (61 loc) • 1.85 kB
JavaScript
import { IgrStraightNumericAxisBase } from "./igr-straight-numeric-axis-base";
import { NumericYAxis } from "./NumericYAxis";
/**
* Represents a IgxDataChartComponent numeric Y axis.
*
* The `NumericYAxis` treats the data as continuously varying numerical data items. Labels on this axis are placed along the Y-axis. Location of labels varies according to the value in a data column that is mapped using the `YMemberPath` property for Scatter Series or `ValueMemberPath` property for Category Series.
*
* ```ts
* <IgrDataChart >
*
* <IgrCategoryXAxis name="xAxis"
* interval={12} labelLocation="OutsideBottom"
* label="Year" overlap={1} gap={0.4} />
*
* <IgrNumericYAxis name="yAxis"
* title="Expanse | Revenue"
* minimumValue={-900} labelLocation="OutsideLeft"
* maximumValue={900}
* interval={300} />
*
*
* <IgrLineSeries name="series1"
* valueMemberPath="Revenue"
* xAxisName="xAxisMonths"
* yAxisName="yAxisLeft"
* consolidatedItemHitTestBehavior="Basic" />
* </IgrDataChart>
* ```
*
* ```ts
* this.series = new IgrColumnSeries({ name: "series1" });
* this.series.dataSource = this.data;
* this.series.xAxis = this.categoryXAxis;
* this.series.yAxis = this.numericYAxis;
* this.series.xAxisName = "xAxis";
* this.series.yAxisName = "yAxis";
* ```
*/
export class IgrNumericYAxis extends IgrStraightNumericAxisBase {
createImplementation() {
return new NumericYAxis();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
/**
* Gets if the current axis is of vertical axis
*/
get isVertical() {
return this.i.dq;
}
scrollRangeIntoView(minimum, maximum) {
this.i.sn(minimum, maximum);
}
}