export default CircleProgress; /** * Create a new Circle Progress bar * @class Circle Progress class */ declare class CircleProgress extends CustomElement { static props: { value: boolean; min: boolean; max: boolean; startAngle: { attribute: string; }; anticlockwise: { type: BooleanConstructor; }; unconstrained: { type: BooleanConstructor; }; indeterminateText: { attribute: string; }; textFormat: { attribute: string; }; animation: boolean; animationDuration: { attribute: string; }; }; static get observedAttributes(): any[]; static defaults: { startAngle: number; min: number; max: number; unconstrained: boolean; indeterminateText: string; anticlockwise: boolean; textFormat: string; animation: string; animationDuration: number; }; /** * Construct the new CircleProgress instance * @constructs * @param {Object} opts Options */ constructor(opts?: any); /** * @type {number} Current value */ value: number; /** * @type {number} Minimum value * @default 0 */ min: number; /** * @type {number} Maximum value * @default 1 */ max: number; /** * @type {number} Start angle * @default 0 */ startAngle: number; /** * @type {boolean} Whether to draw the circle anticlockwise * @default false */ anticlockwise: boolean; /** * @type {boolean} Whether to allow values outside of the min-max range * @default false */ unconstrained: boolean; /** * @type {string} Text to display when the value is indeterminate * @default '?' */ indeterminateText: string; /** * @type {string|Function} Text format * @default 'horizontal' */ textFormat: string | Function; /** * @type {string} Animation easing function * @default 'easeInOutCubic' */ animation: string; /** * @type {number} Animation duration in milliseconds * @default 600 */ animationDuration: number; graph: { paper: any; value: number; }; attributeUpdated(name: any, newValue: any): void; /** * Set attributes * @param {(Array|Object)} attrs Attributes as an array [[key,value],...] or map {key: value,...} * @return {CircleProgress} The CircleProgress instance */ attr(attrs: (any[] | any), ...args: any[]): CircleProgress; /** * Get property value * Flushes pending updates. */ _get(key: any): any; /** * Set an attribute to a value * @param {string} key Attribute name * @param {*} val Attribute value * @return {false|void} false if the value is the same as the current one, void otherwise */ _set(key: string, val: any): false | void; /** * A promise that resolves when the element has finished updating */ updateComplete: any; /** * Schedule an update of a property on microtask level * @param {string} key Property name * @param {*} val Property value */ _scheduleUpdate(key: string, val: any): void; _flushBatch(): void; /** * Format attribute value according to its type * @param {string} key Attribute name * @param {*} val Attribute value * @return {*} Formatted attribute value */ _formatValue(key: string, val: any): any; /** * Convert current value to angle * The caller is responsible to check if the state is not indeterminate. * This is done for optimization purposes as this method is called from within an animation. * @return {number} Angle in degrees */ _valueToAngle(value?: number): number; /** * Check wether the progressbar is in indeterminate state * @return {boolean} True if the state is indeterminate, false if it is determinate */ _isIndeterminate(): boolean; /** * Position the value text on the circle * @param {number} angle Angle at which to position the text * @param {number} r Circle radius measured to the middle of the stroke * as returned by {@link CircleProgress.getRadius}, where text should be. * The radius is passed rather than calculated inside the function * for optimization purposes as this method is called from within an animation. */ _positionValueText(angle: number, r: number): void; /** * Generate text representation of the values based on {@link CircleProgress#textFormat} */ _initText(): void; /** * Update graphics */ updateGraph(): void; /** * Update texts */ _updateText(value: any, angle: any, r: any): void; /** * Get circles' radius based on the calculated stroke widths of the value path and circle * @return {number} The radius */ getRadius(): number; /** * Get SVG element's stroke-width */ _getStrokeWidth(el: any): number; #private; } import CustomElement from './custom-element.js';