File

src/app/views/dynamic/input-detail/input-detail.component.ts

Description

Shows a detailed information box about a specific parameter or model input. Provides metadata and datasets in the form of tables and plots.

Implements

OnInit

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(acronymCatalogService: AcronymCatalogService, parameterService: ParameterService, modelRunService: ModelRunService)

Class contructor uses the acronym catalog service for labels

Parameters :
Name Type Optional
acronymCatalogService AcronymCatalogService No
parameterService ParameterService No
modelRunService ModelRunService No

Inputs

selectedParamater
Type : Parameter

Parameter Object

Methods

Private appendBenchmarks
appendBenchmarks()

Calls append benchmark data only if it has been defined on the parameter object.

Returns : void
chartAppendBenchmarkData
chartAppendBenchmarkData(benchmark: ParamBenchmark)

Append benchmark value to chart

Parameters :
Name Type Optional Description
benchmark ParamBenchmark No

benchmark object to append

Returns : void
Private chartAppendInput
chartAppendInput(modelInput: Parameter)

Appends datasets of a SWIM input to the chartJS object

Parameters :
Name Type Optional Description
modelInput Parameter No

SWIM model input object

Returns : void
generateLabel
generateLabel(obj: any)

Translates a set name to its corresponding acronym meaning

Parameters :
Name Type Optional Description
obj any No

paramValue object

Returns : string
initSliders
initSliders()

Initializes slider visualization

Returns : void
ngOnInit
ngOnInit()

Component initialization method

Returns : void
onBtnExport
onBtnExport()

Export parameter data to csv format. Note: does not work on iPad ios

Returns : void
onCellValueChanged
onCellValueChanged()

Handler: update plot data when table values change

Returns : void
onExportPlot
onExportPlot()

Export image from plot canvas

Returns : void
onGridReady
onGridReady(params)

Assignment of the gridAPI

Parameters :
Name Optional Description
params No

generated grid parameters

Returns : void
onImportCSV
onImportCSV()

Imports only parameter values of the selected input from CSV file

Returns : void
onResetValues
onResetValues()

Resets parameter values back to the default

Returns : void
onSelectUnit
onSelectUnit()

EVENT HANDLERS

Returns : void
onVizChange
onVizChange(vizMode: string)

Switches to a different data visualization view.

Parameters :
Name Type Optional Description
vizMode string No

Visualization modes: table, line chart or bar chart

Returns : void
onZoomIn
onZoomIn()
Returns : void
onZoomOut
onZoomOut()
Returns : void
Public setMovingAverages
setMovingAverages()

Calculate and append moving averages on selected data sets.

Returns : void
tableAppendDatasets
tableAppendDatasets(modelInput: Parameter)

Append datasets contained in a model input to the ng-table widgets

Parameters :
Name Type Optional
modelInput Parameter No
Returns : void

Properties

Public acronymCatalogService
Type : AcronymCatalogService
Private acronymDictionary
Type : any
Default value : {}

Acronym dictionary

analytics
Type : DataAnalytics

Data Analytics Library

Private benchMarkIndex
Type : number
Default value : 0

Benchmark index

chart
Type : BaseChartDirective
Decorators :
@ViewChild(BaseChartDirective)

Access to the chart object

columnDefs
Type : any[]
Default value : []

Column definitions

defaultMode
Type : string
Default value : ""

Default Visualization Mode

Private gridApi

GridAPI object (data table)

labelsReady
Default value : false

flag that activates when acronym labels have been processed

Public lanIndex
Type : number
Default value : 0

Language Index

Public lineChartColors
Type : Color[]
Default value : []

ChartJS color list

Public lineChartData
Type : ChartDataSets[]
Default value : []

ChartJS appended datasets

Public lineChartLabels
Type : Label[]
Default value : []

ChartJS Label list

Public lineChartLegend
Default value : true

Flag to show dataset legends

Public lineChartOptions
Type : ChartOptions
Default value : { responsive: true, scales: { yAxes: [ { ticks: { reverse: this.reverse, }, scaleLabel: { display: true, labelString: null, }, }, ], }, hover: { mode: null }, title: { display: false, text: null, fontSize: 16, }, elements: { line: { tension: 0.1, }, }, }

JSON object with ChartJS options and configurations

Public lineChartPlugins
Type : ChartPluginsOptions
Default value : { zoom: { pan: { enabled: true, mode: 'x', speed: 10, threshold: 10 }, zoom: { enabled: true, mode: 'y' } } }
Public lineChartType
Type : string
Default value : "table"

The type of chart to be displayed (line or bar)

Private lineCounter
Type : number
Default value : 0

Plot dataset counter (lines added to the plot)

mode
Type : string
Default value : "field"

Visualization mode: table, slider, line or bar

movingAverages
Type : any[]
Default value : []

Moving Average List

movingTimeSteps
Type : number
Default value : 2

Moving average timesteps

Private oldUnits
Type : string
Default value : null

Previous units before change

paletteDictionary
Type : PalleteConstants

Palette Dictionary

Public parameterService
Type : ParameterService
Public reverse
Default value : false

Flag to reverse the Y axis order (flip the chart)

rowData
Type : any[]
Default value : []

Data loaded per row

stepSize
Type : number
Default value : 1

step resolution on slider widget

Private unitConverter
Type : UnitConverter

Unit Conversion

unitOptions
Type : string[]
Default value : []

Unit conversion options for this parameter

widgetReady
Default value : false

flag that activates when widget is ready to visualize

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""