UNPKG

@nativescript-community/ui-chart

Version:

A powerful chart / graph plugin, supporting line, bar, pie, radar, bubble, and candlestick charts as well as scaling, panning and animations.

59 lines (58 loc) 2.21 kB
import { AxisBase } from './AxisBase'; /** * enum for the position of the x-labels relative to the chart */ export var XAxisPosition; (function (XAxisPosition) { XAxisPosition[XAxisPosition["TOP"] = 0] = "TOP"; XAxisPosition[XAxisPosition["BOTTOM"] = 1] = "BOTTOM"; XAxisPosition[XAxisPosition["BOTH_SIDED"] = 2] = "BOTH_SIDED"; XAxisPosition[XAxisPosition["TOP_INSIDE"] = 3] = "TOP_INSIDE"; XAxisPosition[XAxisPosition["BOTTOM_INSIDE"] = 4] = "BOTTOM_INSIDE"; })(XAxisPosition || (XAxisPosition = {})); /** * Class representing the x-axis labels settings. Only use the setter methods to * modify it. Do not access public variables directly. Be aware that not all * features the XLabels class provides are suitable for the RadarChart. * */ export class XAxis extends AxisBase { constructor(chart) { super(chart); /** * width of the x-axis labels in pixels - this is automatically * calculated by the computeSize() methods in the renderers */ this.mLabelWidth = 1; /** * height of the x-axis labels in pixels - this is automatically * calculated by the computeSize() methods in the renderers */ this.mLabelHeight = 1; /** * width of the (rotated) x-axis labels in pixels - this is automatically * calculated by the computeSize() methods in the renderers */ this.mLabelRotatedWidth = 1; /** * height of the (rotated) x-axis labels in pixels - this is automatically * calculated by the computeSize() methods in the renderers */ this.mLabelRotatedHeight = 1; /** * This is the angle for drawing the X axis labels (in degrees) */ this.labelRotationAngle = 0; /** * if set to true, the chart will avoid that the first and last label entry * in the chart "clip" off the edge of the chart */ this.avoidFirstLastClipping = true; /** * the position of the x-labels relative to the chart */ this.position = XAxisPosition.TOP; this.yOffset = 4; } } //# sourceMappingURL=XAxis.js.map