UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

58 lines (57 loc) 2.93 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.RadialAxisLayoutStrategy = void 0; var Rect_1 = require("../../../Core/Rect"); var BasePolarAxisLayoutStrategy_1 = require("./BasePolarAxisLayoutStrategy"); var RadialAxisLayoutStrategy = /** @class */ (function (_super) { __extends(RadialAxisLayoutStrategy, _super); function RadialAxisLayoutStrategy() { return _super !== null && _super.apply(this, arguments) || this; } RadialAxisLayoutStrategy.prototype.measureAxes = function (sciChartSurface, chartLayoutState, axes) { axes.forEach(function (axis) { axis.measure(); // const { axisRenderer, axisTitleRenderer, axisLayoutState, axisBorder } = axis; // axisLayoutState.clear(); // axisLayoutState.axisSize = axisRenderer.desiredHeight + axisTitleRenderer.desiredHeight; // axisLayoutState.additionalBottomSize = axisBorder.borderBottom; // axisLayoutState.additionalTopSize = axisBorder.borderTop; // axisLayoutState.additionalRightSize = axisBorder.borderRight; // axisLayoutState.additionalLeftSize = axisBorder.borderLeft; }); return 0; }; RadialAxisLayoutStrategy.prototype.layoutAxes = function (left, top, radius, outerRadius, axes) { // x, y, radius axes.forEach(function (axis) { axis.axisLength = radius; axis.offset = 0; // const { // axisLayoutState: { axisSize, additionalTopSize, additionalBottomSize }, // axisRenderer, // startAngle // } = axis as PolarAxisBase; // const axisThickness = axisSize + additionalTopSize + additionalBottomSize; // These are already offset axis.viewRect = Rect_1.Rect.create(left, top, radius, 1); // axisRenderer.layout(axis.viewRect); }); }; return RadialAxisLayoutStrategy; }(BasePolarAxisLayoutStrategy_1.BasePolarAxisLayoutStrategy)); exports.RadialAxisLayoutStrategy = RadialAxisLayoutStrategy;