@syncfusion/ej2-progressbar
Version:
Essential JS 2 ProgressBar Component
277 lines (240 loc) • 4.9 kB
text/typescript
import { ChildProperty, Property, Complex } from '@syncfusion/ej2-base';
import { TextAlignmentType } from '../utils/enum';
import { BorderModel, FontModel } from './progress-base-model';
/**
* progress bar complex interface
*/
export class Margin extends ChildProperty<Margin> {
/**
* To customize top margin value
*
* @default 10
*/
public top: number;
/**
* To customize top bottom value
*
* @default 10
*/
public bottom: number;
/**
* To customize top left value
*
* @default 10
*/
public left: number;
/**
* To customize top right value
*
* @default 10
*/
public right: number;
}
/**
* Configures the fonts in progressbar
*/
export class Font extends ChildProperty<Font> {
/**
* FontStyle for the text.
*
* @default 'Normal'
*/
public fontStyle: string;
/**
* Font size for the text.
*
* @default '16px'
*/
public size: string;
/**
* FontWeight for the text.
*
* @default 'Normal'
*/
public fontWeight: string;
/**
* Color for the text.
*
* @default ''
*/
public color: string;
/**
* FontFamily for the text.
*/
public fontFamily: string;
/**
* Opacity for the text.
*
* @default null
*/
public opacity: number;
/**
* text alignment for label
*
* @default Far
*/
public textAlignment: TextAlignmentType;
/**
* label text
*
* @default ''
*/
public text: string;
}
/**
* Animation
*/
export class Animation extends ChildProperty<Animation> {
/**
* enable
*
* @default false
*/
public enable: boolean;
/**
* duration
*
* @default 2000
*/
public duration: number;
/**
* delay
*
* @default 0
*/
public delay: number;
}
/**
* Annotation
*/
export class ProgressAnnotationSettings extends ChildProperty<ProgressAnnotationSettings> {
/**
* Content of the annotation, which accepts the id of the custom element.
*
* @default null
*/
public content: string;
/**
* to move annotation
*
* @default 0
*/
public annotationAngle: number;
/**
* to move annotation
*
* @default '0%'
*/
public annotationRadius: string;
}
/**
* Configures the borders .
*/
export class Border extends ChildProperty<Border> {
/**
* The color of the border that accepts value in hex as a valid CSS color string.
*
* @default ''
*/
public color: string;
/**
* The width of the border in pixels.
*
* @default 1
*/
public width: number;
}
/**
* Options to customize the tooltip for the progress bar.
*
* @default {}
*/
export class TooltipSettings extends ChildProperty<TooltipSettings> {
/**
* If set to true, tooltip will be displayed for the progress bar.
*
* @default false.
*/
public enable: boolean;
/**
* The fill color of the tooltip that accepts value in hex as a valid CSS color string.
*
* @default null.
*/
public fill: string;
/**
* Format the tooltip content. Use ${value} as the placeholder text to display the corresponding progress value.
*
* @default null.
*/
public format: string;
/**
* If set to true, tooltip will be displayed for the progress bar on mouse hover.
*
* @default false.
*/
public showTooltipOnHover: boolean;
/**
* Options to customize the tooltip text.
*
*/
<FontModel>({fontFamily: null, size: '12px', fontWeight: null, fontStyle: 'Normal', color: null}, Font)
public textStyle: FontModel;
/**
* Options to customize tooltip borders.
*
* @default {}
*/
<BorderModel>({ color: '#cccccc', width: 0.5 }, Border)
public border: BorderModel;
}
/**
* RangeColor
*/
export class RangeColor extends ChildProperty<RangeColor> {
/**
* color
*
* @default null
*/
public color: string;
/**
* start
*
* @default null
*/
public start: number;
/**
* end
*
* @default null
*/
public end: number;
}