define(["require", "exports", "@syncfusion/ej2-base", "./helper-common"], function (require, exports, ej2_base_1, helper_common_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function setStyles(element, fill, border) {
ej2_base_1.setStyleAttribute(element, {
'stroke': border.color, 'stroke-width': border.width,
'fill': fill
});
}
exports.setStyles = setStyles;
function getValueFromAngle(angle, maximumValue, minimumValue, startAngle, endAngle, isClockWise) {
endAngle -= helper_common_1.isCompleteAngle(startAngle, endAngle) ? 0.0001 : 0;
angle = angle < startAngle ? (angle + 360) : angle;
if (isClockWise) {
return (((angle - startAngle) / helper_common_1.getDegree(startAngle, endAngle)) * (maximumValue - minimumValue)) + minimumValue;
}
else {
return maximumValue - ((((angle - startAngle) / helper_common_1.getDegree(startAngle, endAngle)) * (maximumValue - minimumValue)));
}
}
exports.getValueFromAngle = getValueFromAngle;
function getRange(targetId, gauge) {
var tempString = targetId.replace(gauge.element.id, '').split('_Axis_')[1];
return {
axisIndex: +tempString[0],
rangeIndex: +tempString.split('Range_')[1]
};
}
exports.getRange = getRange;
});
|