import { OnInit } from '@angular/core'; /** * An interface that represents the content of a feature object. */ export interface Feature { /** * The feature's name. */ name: string; /** * The feature's achieved percentage. */ achieved: number; } /** * An interface that represents the content of a product object. * Its achieved percentage value is calculated from its `features` array field. */ export interface Product { /** * The product's name. */ name: string; /** * The product's features array. */ features: Feature[]; } /** * An interface that represents the content of a result object. */ export interface Result { /** * The result's name. */ name: string; /** * The result's value. */ value: number; } /** * An interface that represents the content of a chart bar object. * Its `series` field is an array of length 2 that contains * the achieved/unresolved results; for example, `'series': [ { 'name': 'achieved', 'value': 20 }, { 'name': 'unresolved', 'value': 80 } ]` */ export interface ChartBar { /** * The chart's bar name. */ name: string; /** * The results array that makes up the chart's bar. */ series: Result[]; } /** * An interface that represents the content of an entry element object. */ export interface EntryElement { name: string; value?: number; label?: string; series?: string; } /** * Component for displaying a roadmap. It basically displays the products * that we are currently working, and the products that we will work in the future. * Besides, when a product is selected, its features are displayed. * It always shows the achieved/unresolved work in percentage. */ export declare class RoadMapComponent implements OnInit { /** * Returns the -1 value that is used to remove a chart. */ readonly removeChart_PosFlag = -1; /************************************************************************** ************************************************************************** * Options for displaying the products list. ************************************************************************** *************************************************************************/ /** * Input field that contains the text that is displayed when there is not any product. * By default, its value is `'¡No hay ningún producto!'`. */ withoutProductText: string; /** * Returns the chart's visualization direction. * It is true if the chart is visualized vertically; otherwise, false (horizontally). * By default, its value is `true`. */ private _isChartVertical; /** * Input field that contains the tab's label of current works. * By default, its value is `'Trabajos Actuales'`. */ tabLabel_CW: string; /** * Input field that contains the tab's label of future works. * By default, its value is `'Trabajos Futuros o Pendientes'`. */ tabLabel_FW: string; /** * Returns the selected tab position. Its value is set internally. */ private _selectedTabPos; /** * Returns the grid height. * Its value is set depending on the `legendPosition` value. */ private _gridHeight; /** * Input field that contains the chart's title of products. * By default, its value is `'Lista de productos'`. */ chartTitle_P: string; /** * Returns true if it is using a trick to obligate repainting the chart; otherwise, false. */ private _isUsingTrick_RepaintChart; /** * Returns the working products array introduced by the user. * It references the `_currentProducts` or `_futureProducts` array. * By default, its value is `[]`. */ private _products; /** * Returns the current products array introduced by the user. * From this array is created the `_currentProducts_Internal` and `_currentFeatures_Internal` arrays. * By default, its value is `[]`. */ private _currentProducts; /** * Returns the future products array introduced by the user. * From this array is created the `_futureProducts_Internal` and `_futureFeatures_Internal` arrays. * By default, its value is `[]`. */ private _futureProducts; /** * Returns the working products array displayed in the chart. * It references the `_currentProducts_Internal` or `_futureProducts_Internal` array. * It is created from the `_products` array. * By default, its value is `[]`. */ private _products_Internal; /** * Returns the current products array displayed in the chart. * It is created from the `_currentProducts` array. * By default, its value is `[]`. */ private _currentProducts_Internal; /** * Returns the future products array displayed in the chart. * It is created from the `_futureProducts` array. * By default, its value is `[]`. */ private _futureProducts_Internal; /** * Returns the array that contains all working features arrays that can be displayed in the chart. * This array contains the same length than `_products_Internal` array because * each position contains the working features array for a product. * It references the `_currentFeaturesTotal_Internal` or `_futureFeaturesTotal_Internal` array. * It is created from the `_products` array. * This array is for internal use only. * By default, its value is `[]`. */ private _featuresTotal_Internal; /** * Returns the array that contains all current features arrays that can be displayed in the chart. * This array contains the same length than `_currentProducts_Internal` array because * each position contains the current features array for a product. * It is created from the `_currentProducts` array. * This array is for internal use only. * By default, its value is `[]`. */ private _currentFeaturesTotal_Internal; /** * Returns the array that contains all future features arrays that can be displayed in the chart. * This array contains the same length than `_futureProducts_Internal` array because * each position contains the future features array for a product. * It is created from the `_futureProducts` array. * This array is for internal use only. * By default, its value is `[]`. */ private _futureFeaturesTotal_Internal; /** * Returns the working features array of a selected product displayed in the chart. * It references an element in the `_featuresTotal_Internal` array. This element * represents the features of a selected product in the `_products_Internal` array. * It references the `_currentFeatures_Internal` or `_futureFeatures_Internal` array. * By default, its value is `[]`. */ private _features_Internal; /** * Returns the current features array of a selected product displayed in the chart. * It references an element in the `_currentFeaturesTotal_Internal` array. This element * represents the features of a selected product in the `_currentProducts_Internal` array. * By default, its value is `[]`. */ private _currentFeatures_Internal; /** * Returns the future features array of a selected product displayed in the chart. * It references an element in the `_futureFeaturesTotal_Internal` array. This element * represents the features of a selected product in the `_futureProducts_Internal` array. * By default, its value is `[]`. */ private _futureFeatures_Internal; /** * Returns the current product elements array to highlight displayed in the chart. * It is modified dynamically. * By default, its value is `[]`. */ private _activeEntries_P_CW; /** * Returns the future product elements array to highlight displayed in the chart. * It is modified dynamically. * By default, its value is `[]`. */ private _activeEntries_P_FW; /** * Input field that contains the chart's dimensions [width, height]. * By default, its value is `[900, 350]`. */ view: number[]; /** * Input field that contains the chart's color scheme of current works. * By default, its value is the following object: `{ domain: [ '#6EE9B5', // light green '#E96E70' // red ] }` */ colorScheme_CW: any; /** * Input field that contains the chart's color scheme of future works. * By default, its value is the following object: `{ domain: [ '#6F6EE9', // blue '#6EBBE9' // light blue ] }` */ colorScheme_FW: any; /** * Input field that indicates to fill chart's elements with a gradient or a solid color. * It is true if the chart's elements are filled with a gradient color; otherwise, false (filled with a solid color). * By default, its value is `false`. */ gradient: boolean; /** * Input field that contains the chart's padding between bars in px. * By default, its value is `12`. */ barPadding: number; /** * Shows the chart's x axis. */ readonly showXAxis: boolean; /** * Shows the chart's x axis label. */ readonly showXAxisLabel: boolean; /** * Input field that contains the chart's x axis label text of products. * By default, its value is `'Producto'`. */ xAxisLabel_P: string; /** * Input field that contains the chart's max length of the ticks (ticks over this length will be trimmed). * By default, its value is `16`. */ maxAxisTickLength: number; /** * Shows the chart's y axis. */ readonly showYAxis: boolean; /** * Shows the chart's y axis label. */ readonly showYAxisLabel: boolean; /** * Input field that contains the chart's y axis label text of products. * By default, its value is `'Realizado / Pendiente En Por Ciento'`. */ yAxisLabel_P: string; /** * Shows the chart's legend. */ readonly showLegend: boolean; /** * Input field that contains the chart's legend title. * By default, its value is `'Leyenda'`. */ legendTitle: string; /** * Input field that contains the chart's legend position. Its value is `'right'` or `'below'`. * By default, its value is `'right'`. */ private _legendPosition; /************************************************************************** ************************************************************************** * Options for displaying the features list of a selected product. ************************************************************************** *************************************************************************/ /** * Returns the working product position. Contains the `removeChart_PosFlag` value when * there is not any selected working product position. * It has the `_selectedProductPos_CW` or `_selectedProductPos_FW` value. */ private _selectedProductPos; /** * Returns the selected current product position. Contains the `removeChart_PosFlag` value when * there is not any selected current product position. */ private _selectedProductPos_CW; /** * Returns the selected future product position. Contains the `removeChart_PosFlag` value when * there is not any selected future product position. */ private _selectedProductPos_FW; /** * Returns the chart's title of features. * This field is updated a little different. * By default, its value is `'Lista de características del producto seleccionado'`. */ private _chartTitle_F; /** * Returns the chart's title of working current features. * This field is updated a little different. * By default, its value is `'Lista de características del producto seleccionado'`. */ private _chartTitle_F_CW; /** * Returns the chart's title of working future features. * This field is updated a little different. * By default, its value is `'Lista de características del producto seleccionado'`. */ private _chartTitle_F_FW; /** * Input field that contains the chart's x axis label text of features. * By default, its value is `'Característica'`. */ xAxisLabel_F: string; /** * Input field that contains the chart's y axis label text of features. * By default, its value is `'Realizado / Pendiente En Por Ciento'`. */ yAxisLabel_F: string; constructor(); ngOnInit(): void; /** * Returns the input field that contains the chart's visualization direction. * It is true if the chart is visualized vertically; otherwise, false (horizontally). * When this value is set, the `xAxisLabel_P`/`yAxisLabel_P` and `xAxisLabel_F`/`yAxisLabel_F` values are set accordingly. * By default, its value is `true`. */ /** * Sets the input field that contains the chart's visualization direction. * It is true if the chart is visualized vertically; otherwise, false (horizontally). * When this value is set, the `xAxisLabel_P`/`yAxisLabel_P` and `xAxisLabel_F`/`yAxisLabel_F` values are set accordingly. * By default, its value is `true`. * @param value The new chart's visualization direction to set. */ isChartVertical: boolean; /** * Returns the grid height. * Its value is set depending on the `legendPosition` value. */ readonly gridHeight: number; /** * Returns the input field that contains the current products array introduced by the user. * From this array is created the `currentProducts_Internal` and `currentFeatures_Internal` arrays. * By default, its value is `[]`. */ /** * Sets the input field that contains the current products array. * By default, its value is `[]`. * @param value The new current products array to set. */ currentProducts: Product[]; /** * Returns the current products array displayed in the chart. * It is created from the `currentProducts` array. * By default, its value is `[]`. */ readonly currentProducts_Internal: ChartBar[]; /** * Returns the current features array of a selected product displayed in the chart. * It is created from the `currentProducts` array. * By default, its value is `[]`. */ readonly currentFeatures_Internal: ChartBar[]; /** * Returns the input field that contains the future products array introduced by the user. * From this array is created the `futureProducts_Internal` and `futureFeatures_Internal` arrays. * By default, its value is `[]`. */ /** * Sets the input field that contains the future products array. * By default, its value is `[]`. * @param value The new future products array to set. */ futureProducts: Product[]; /** * Returns the future products array displayed in the chart. * It is created from the `futureProducts` array. * By default, its value is `[]`. */ readonly futureProducts_Internal: ChartBar[]; /** * Returns the future features array of a selected product displayed in the chart. * It is created from the `futureProducts` array. * By default, its value is `[]`. */ readonly futureFeatures_Internal: ChartBar[]; /** * Returns the current product elements array to highlight displayed in the chart. * It is modified dynamically. * By default, its value is `[]`. */ readonly activeEntries_P_CW: EntryElement[]; /** * Sets the current product elements array to highlight displayed in the chart. * @param setEmpty If it is true, then sets the `_activeEntries_P_CW` array to empty. */ private _set_activeEntries_P_CW; /** * Returns the future product elements array to highlight displayed in the chart. * It is modified dynamically. * By default, its value is `[]`. */ readonly activeEntries_P_FW: EntryElement[]; /** * Sets the future product elements array to highlight displayed in the chart. * @param setEmpty If it is true, then sets the `_activeEntries_P_FW` array to empty. */ private _set_activeEntries_P_FW; /** * Returns the input field that contains the chart's legend position. Its value is `'right'` or `'below'`. * By default, its value is `'right'`. */ /** * Sets the input field that contains the chart's legend position. Its value is `'right'` or `'below'`. * By default, its value is `'right'`. * @param value The new chart's legend position to set. */ legendPosition: string; /** * Returns a boolean value that indicates the legend position. * It is true if the legend position is `'right'`; otherwise, false (`'below'`). * By default, its value is `true`. */ /** * Sets a boolean value that indicates the legend position. * It is true if the legend position is `'right'`; otherwise, false (`'below'`). * By default, its value is `true`. * @param value The new boolean value to set. */ isLegendRight: boolean; /** * Returns the selected current product position. Contains the `removeChart_PosFlag` value when * there is not any selected current product position. */ readonly selectedProductPos_CW: number; /** * Returns the selected future product position. Contains the `removeChart_PosFlag` value when * there is not any selected future product position. */ readonly selectedProductPos_FW: number; /** * Returns the input field that contains the chart's title of features. * By default, its value is `'Lista de características del producto seleccionado'`. */ /** * Sets the input field that contains the chart's title of features. * By default, its value is `'Lista de características del producto seleccionado'`. * @param value The new chart's title of features to set. */ chartTitle_F: string; /** * Returns the chart's title of working current features. * By default, its value is `'Lista de características del producto seleccionado'`. */ readonly chartTitle_F_CW: string; /** * Returns the chart's title of working future features. * By default, its value is `'Lista de características del producto seleccionado'`. */ readonly chartTitle_F_FW: string; onSelectTab(newPos: number): void; onSelect(eventInfo: any): void; onActivate(eventInfo: any): void; onDeactivate(eventInfo: any): void; /** * Sets the data of current works. */ private _setData_CW; /** * Sets the data of future works. */ private _setData_FW; /** * Returns true if the features chart is showed; otherwise, false. */ private readonly _isFeaturesChartShowed; /** * Updates the `selectedProductPos`. If the new selected position equals the current * selected position, then the chart for displaying the features list of the selected product * will be removed. * @param newSelectedPosition The new selected position. */ private _updateProductPos; /** * Creates the internal arrays that are going to be passed in the template * for the current/future products/features accordingly. * @param products The current/future products array introduced by the user. * @param products_Internal The current/future products array displayed in the chart. * @param featuresTotal_Internal The array that contains all current/future features arrays that can be displayed in the chart. */ private _createsInternalArrays; /** * Removes the chart for displaying the features list of the selected product. */ click_RemoveChart(): void; }