import { TYPE_CONVERT_UNIT, TYPE_GRAPH } from './type-graph.enum'; import { NoResults } from './no-results'; export declare type customLabelFunctionType = (value: string | number, formattedValue: any, valueAxis: any) => string | number; export interface IbulletConfig { bullet?: string; bulletBorderAlpha?: number; bulletSize?: number; bulletAlpha?: number; } export interface IlineConfig { lineThickness?: number; fillAlphas?: number; lineAlpha?: number; lineColor?: string; useLineColorForBulletBorder?: boolean; } export interface IcolorGraph { [key: string]: string; } export interface IcategoryAxis { /** * Alpha value for categoryAxis/X --> 0, invisible; 1, visible */ axisAlpha?: number; /** * Alpha value for categoryGrid --> 0, invisible; 1, visible */ gridAlpha?: number; /** * It decides if the labels in categoryAxis/X exist --> true: exists; false: don't exist */ labelsEnabled?: boolean; /** * It decides if the labels in categoryAxis/X are transparent - certain values for chartCursor need labels to exists. * So labes can exist, but they can aslo be transparent --> true: visible; false: transparent */ labelsColor?: boolean; /** * Gives rotation to the labels in ategoryAxis/X */ labelRotation?: number; } export interface IvalueAxis { /** * Alpha value for valueAxis/Y --> 0, invisible; 1, visible */ axisAlpha?: number; /** * Alpha value for valueGrid --> 0, invisible; 1, visible */ gridAlpha?: number; /** * It decides if the labels in valueAxis/Y exist --> true: exists; false: don't exist */ labelsEnabled?: boolean; /** * Position of units in valueAxis/Y: default is right; options: left, right */ unitPosition?: 'left' | 'right'; /** * Units in valueAxis/Y */ unit?: string; /** * It decides if the values are shown in logaritmic. If there is any value that is 0, it won't work; so the charts in the application * have a built in function 'isLogaritmic', in GenericChartModel', that transforms the values outside the amcharts library */ logarithmic?: boolean; /** * min value in valueAxis/Y to display */ minimum?: number; /** * max value in valueAxis/Y to display */ maximum?: number; /** * precision in values - number of decimals - */ precision?: number; } export interface IConfigGraphArg { /** * custom function for label * not implemented */ customLabelFunction?: customLabelFunctionType; /** * custom function for balloon * not implemented */ balloonCustomFunction?: boolean; /** * The way the bullets are being displayed */ bulletConfig?: IbulletConfig; /** * The way the lines are being displayed */ lineConfig?: IlineConfig; /** * If true, shows a default scrollbar in valueAxis/Y */ chartScrollbar?: boolean; /** * Object that configures categoryAxis */ categoryAxis?: IcategoryAxis; /** * Name for the categoryAxis/X; */ categoryField?: string; /** * If true, shows a default scrollbar in valueAxis/Y */ valueScrollbar?: boolean; /** * Object that configures categoryAxis */ valueAxis?: IvalueAxis; /** * It decides if the function 'isLogaritmic', in GenericChartModel', transforms the values outside the amcharts library */ customLogarithmic?: boolean; /** * It decides if the graph has chartCursor. Of this depends that there is a balloon in the graph if there are no bullets in it. * It gives the default configuration of chartCursor */ chartCursor?: boolean; /** * It gives a built in configuration of chartCursor */ balloonPointerOrientation?: boolean; /** * it gives a built in configuration for the text shown in the balloon */ balloonText?: boolean; /** * Top margin for the graphic */ marginTop?: number; /** * Bottom margin for the graphic */ marginBottom?: number; /** * Right margin for the graphic */ marginRight?: number; /** * Left margin for the graphic */ marginLeft?: number; /** * Width of the div created for the graph */ width?: string; /** * height of the div created for the graph */ height?: string; /** * If true, it gives a built in legend for the graph. It is built in each type of graph */ isLegend?: boolean; /** * If true, it makes a conversion in the categoryField in order to parse the data format */ isTimeStamp?: boolean; /** * If true, the categoryAxis values will be sorted; if the categoryField is 'days', it will sort by days */ isSortable?: boolean; /** * id used to create the div for the graph with an unic id */ id?: number | string; /** * index used to create the div for the graph with an unic id */ index?: number; /** * graphAlias used to create the div for the graph with an unic id */ graphAlias?: string; /** * id used in the div for the graph */ divId?: string; /** * used to convert units in balloon text */ unitConverterType?: TYPE_CONVERT_UNIT; /** * used to convert units in valueAxis Labels */ valueAxisConverterType?: TYPE_CONVERT_UNIT; /** * used to convert units in valueAxis Labels */ colorGraph?: IcolorGraph; } export declare class ValuesSerieDetailGraph { value: any; key: any; constructor(value: any, key: any); } export declare class SerieDetailGraph { name: string; values: ValuesSerieDetailGraph[]; constructor(values: ValuesSerieDetailGraph[], name?: string); } export declare class DetailGraph { title: string; xlabel: string; ylabel: string; series: SerieDetailGraph[]; constructor({title, xlabel, ylabel, series}: { title: string; xlabel: string; ylabel: string; series: SerieDetailGraph[]; } | any); } export declare class ConfigGraph { customLabelFunction: customLabelFunctionType; balloonCustomFunction: boolean; bulletConfig?: IbulletConfig; lineConfig?: IlineConfig; chartScrollbar: boolean; valueScrollbar: boolean; valueAxis: IvalueAxis; customLogarithmic: boolean; chartCursor: boolean; balloonPointerOrientation: boolean; balloonText: boolean; categoryField: string; categoryAxis: IcategoryAxis; marginTop: number; marginBottom: number; marginRight: number; marginLeft: number; width: string; height: string; isLegend: boolean; isTimeStamp: boolean; isSortable: boolean; id: number | string; index: number; graphAlias: string; colorGraph: IcolorGraph; divId: string; unitConverterType: TYPE_CONVERT_UNIT; valueAxisConverterType: TYPE_CONVERT_UNIT; constructor({graph, config}: { graph: Graph; config?: IConfigGraphArg; name?: string; }); } export declare class Converter { protected static timeConverterFromSecondsToUnit(value: any, unit: any): any; protected static quantityConvert(quantity: any, decimals?: number, thousands?: number): string; } export declare class AxisConverter extends Converter { static secondsToDays(value: any, formattedValue: any, valueAxis: any): string; static customFormat(value: any, formattedValue: any, valueAxis: any): string; static formatValue(value: any, formattedValue: any, valueAxis: any): string; static default(value: any, formattedValue: any, valueAxis: any): string; } export declare class UnitConverter extends Converter { static secondsToDays(value: string, unit: string): string; static customFormat(value: string, unit?: string): string; static formatValue(value: string, unit?: string): string; static default(value: string, unit: string): string; } export declare class Graph { id: number | string; graph: DetailGraph; config: ConfigGraph; type: TYPE_GRAPH; noResults: NoResults; PRECISION_REQUIREMENTS: {}; CSS_FOUR_COLORS_NAMES: string[]; CSS_COLOR_CORPORATIVE: string[]; CORPORATIVE_COLORS: { GOOD: string; MEDIUM: string; WARN: string; HIGH: string; BAD: string; CRITICAL: string; LOW: string; }; constructor(); } export declare class GraphFactory { static graphicLoad({graphData, name, id, type, config, noResults}: { graphData?: DetailGraph; name?: string; id?: number | string; type?: TYPE_GRAPH | string; config?: IConfigGraphArg; noResults?: NoResults; }): Graph; static graphicCopy({id, graph, config, type, noResults}: { id: any; graph: any; config: any; type: any; noResults: any; }): Graph; }