igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
107 lines (106 loc) • 3.89 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { TickmarkValues } from "./TickmarkValues";
import { DependencyProperty } from "igniteui-react-core";
import { LogarithmicNumericSnapper } from "./LogarithmicNumericSnapper";
import { Number_$type, typeGetValue, markType } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { truncate, logBase } from "igniteui-react-core";
/**
* @hidden
*/
export let LogarithmicTickmarkValues = /*@__PURE__*/ (() => {
class LogarithmicTickmarkValues extends TickmarkValues {
constructor() {
super(...arguments);
this.t = null;
this.u = null;
}
s(a) {
super.s(a);
let b = new LogarithmicNumericSnapper(a.n, a.m, this.x, a.k);
this.m = 1;
this.r = truncate(b.h);
this.p = truncate(Math.floor(logBase(Math.max(4.94065645841247E-324, a.n), this.x)));
this.q = truncate(Math.ceil(logBase(Math.max(4.94065645841247E-324, a.m), this.x)));
}
get x() {
return typeGetValue(this.c(LogarithmicTickmarkValues.z));
}
set x(a) {
this.h(LogarithmicTickmarkValues.z, a);
}
v(a) {
let b = a * this.m;
return Math.pow(this.x, b);
}
j() {
let a = this.p;
let b = this.q;
let c = this.o;
let d = 0;
for (let e = a; e <= b; ++e) {
let f = this.v(e);
if (f <= c) {
d++;
}
}
if (this.t == null || this.t.length != d) {
this.t = new Array(d);
}
let g = this.t;
let h = 0;
for (let i = a; i <= b; ++i) {
let j = this.v(i);
if (j <= c) {
g[h] = j;
h++;
}
}
return g;
}
k() {
let a = this.p;
let b = this.q;
let c = this.x;
let d = this.r;
let e = this.o;
let f = 0;
for (let g = a; g <= b; ++g) {
let h = this.v(g);
let i = Math.pow(c, g);
for (let j = 1; j < this.r - 1; ++j) {
let k = h + j * i;
if (k <= e) {
f++;
}
}
}
if (this.u == null || this.u.length != f) {
this.u = new Array(f);
}
let l = this.u;
let m = 0;
for (let n = a; n <= b; ++n) {
let o = this.v(n);
let p = Math.pow(c, n);
for (let q = 1; q < this.r - 1; ++q) {
let r = o + q * p;
if (r <= e) {
l[m] = r;
m++;
}
}
}
return l;
}
}
LogarithmicTickmarkValues.$t = /*@__PURE__*/ markType(LogarithmicTickmarkValues, 'LogarithmicTickmarkValues', TickmarkValues.$);
LogarithmicTickmarkValues.z = /*@__PURE__*/ DependencyProperty.i("LogarithmBase", Number_$type, LogarithmicTickmarkValues.$, /*@__PURE__*/ new PropertyMetadata(2, 10, (a, b) => {
}));
return LogarithmicTickmarkValues;
})();