File

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

Description

Shows data details of scenario theme

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(dialogRef: MatDialogRef<ThemeDetailComponent>, acronymCatalogService: AcronymCatalogService, parameterService: ParameterService, themeCatalogService: ThemeCatalogService, modelRunService: ModelRunService, selectedTheme: Theme)

Class constructor. This is a dialog component. Uses AcronymCatalog and Parameter Service. Received Injection of the selected theme.

Parameters :
Name Type Optional
dialogRef MatDialogRef<ThemeDetailComponent> No
acronymCatalogService AcronymCatalogService No
parameterService ParameterService No
themeCatalogService ThemeCatalogService No
modelRunService ModelRunService No
selectedTheme Theme No

Methods

Private appendBenchmarks
appendBenchmarks(relatedParameter: Parameter)

Append SWIM benchmark data

Parameters :
Name Type Optional
relatedParameter Parameter No
Returns : void
chartAppendBenchmarkData
chartAppendBenchmarkData(benchmark: ParamBenchmark)

Append benchmark value to chart This function is to be called after chart data has been appended.

Parameters :
Name Type Optional Description
benchmark ParamBenchmark No

benchmark object to append

Returns : void
chartAppendData
chartAppendData(selectedParam: RelatedParameter)

Converts paramValue into chart JS data structures

Parameters :
Name Type Optional
selectedParam RelatedParameter No
Returns : void
ngOnInit
ngOnInit()

Create and load data chart

Returns : void
onNoClick
onNoClick()

Dialog close on cancel.

Returns : void
Public onSelectRelatedParam
onSelectRelatedParam()

Load dataset from the selected related parameter.

Returns : void
onSelectUnit
onSelectUnit()

Change selected parameter values to the unit specified and append to charts

Returns : void

Properties

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

Acronym dictionary

Private auxRelatedParam
Type : Parameter
Default value : null

Auxilary Related Parameter for Unit Conversion (using its values)

Public auxSelectedParam
Type : RelatedParameter
Default value : null

Auxilary selected parameetr for unit conversion (using its benchmakrs)

Private benchMarkIndex
Type : number
Default value : 0
chart
Type : BaseChartDirective
Decorators :
@ViewChild(BaseChartDirective)

Access to the chart object

chartReady
Default value : true

Chart Ready Flag

Public dialogRef
Type : MatDialogRef<ThemeDetailComponent>
isLoading
Default value : false

loading flag

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: 32 }, elements: { line: { tension: 0.1 } } }

JSON object with ChartJS options and configurations

Public lineChartType
Type : string
Default value : 'line'

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

Private oldUnits
Type : string
Default value : null

Previous units before change

paletteDictionary
Type : PalleteConstants

Palette Dictionary

Public parameterService
Type : ParameterService
relatedParam
Type : Parameter

Related Parameter

Public reverse
Default value : false

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

selectedParam
Type : RelatedParameter

Selected related parameter to view data

Public selectedTheme
Type : Theme
Decorators :
@Inject(MAT_DIALOG_DATA)
selectedUnit
Type : string

Currently selected units

Private startDate

projection start date for x axis on charts

Public themeCatalogService
Type : ThemeCatalogService
Private unitConverter
Type : UnitConverter

Unit Conversion

unitOptions
Type : string[]
Default value : []

Unit conversion options for this output

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""