igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
155 lines (152 loc) • 4.39 kB
JavaScript
import { IgrHorizontalRangeCategorySeries } from "./igr-horizontal-range-category-series";
import { RangeColumnSeries } from "./RangeColumnSeries";
import { toPoint, fromRect } from "igniteui-react-core";
/**
* Represents a IgxDataChartComponent range column series.
*
* The `RangeColumnSeries` class represents range column series of the IgxDataChartComponent.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Year" />
* <IgrNumericYAxis name="yAxis" />
*
* <IgrRangeColumnSeries
* name="series1"
* xAxisName="xAxis"
* yAxisName="yAxis"
* highMemberPath="High"
* lowMemberPath="Low" />
* </IgrDataChart>
* ```
*
* ```ts
* const series1 = new IgrRangeColumnSeries({ name: "series1" });
* series1.highMemberPath = "High";
* series1.lowMemberPath = "Low";
* series1.xAxisName = "xAxis";
* series1.yAxisName = "yAxis";
* this.chart.series.add(series1);
* ```
*/
export class IgrRangeColumnSeries extends IgrHorizontalRangeCategorySeries {
createImplementation() {
return new RangeColumnSeries();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
/**
* Gets whether the current series shows a column shape.
*/
get isColumn() {
return this.i.e1;
}
/**
* Overridden by derived series classes to indicate when marker-less display is preferred or not.
*/
get isMarkerlessDisplayPreferred() {
return this.i.fm;
}
/**
* Gets or sets the x-radius of the ellipse that is used to round the corners of the column.
*
* Use the `RadiusX` property to round the corners of the column.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Year" />
* <IgrNumericYAxis name="yAxis" />
*
* <IgrRangeColumnSeries
* name="series1"
* xAxisName="xAxis"
* yAxisName="yAxis"
* highMemberPath="High"
* lowMemberPath="Low"
* radiusX={10} />
* </IgrDataChart>
* ```
*
* ```ts
* series.radiusX=10;
* ```
*/
get radiusX() {
return this.i.ab8;
}
set radiusX(v) {
this.i.ab8 = +v;
}
/**
* Gets or sets the y-radius of the ellipse that is used to round the corners of the column.
*
* Use the `RadiusY` property for the y-radius of the ellipse that is used to round the corners of the column.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Year" />
* <IgrNumericYAxis name="yAxis" />
*
* <IgrRangeColumnSeries
* name="series1"
* xAxisName="xAxis"
* yAxisName="yAxis"
* highMemberPath="High"
* lowMemberPath="Low"
* radiusY={10} />
* </IgrDataChart>
* ```
*
* ```ts
* series.radiusY=10;
* ```
*/
get radiusY() {
return this.i.ab9;
}
set radiusY(v) {
this.i.ab9 = +v;
}
/**
* If possible, will return the best available value bounding box within the series that has the best value match for the world position provided.
* @param world * The world coordinate for which to get a value bounding box for
*
* The `GetSeriesValueBoundingBox` method return the best available value of the bounding box within the series.
*/
getSeriesValueBoundingBox(world) {
let iv = this.i.ws(toPoint(world));
return fromRect(iv);
}
/**
* For a category plotted series, returns the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned.
*
* The `GetItemSpan` method returns the current width of the items within the categories.
*
* ```ts
* var x =series.getItemSpan();
* ```
*/
getItemSpan() {
let iv = this.i.ix();
return (iv);
}
}