echart/charts.component.ts
OnChanges
OnInit
OnDestroy
| providers |
{ provide: NGX_ECHARTS_CONFIG, useFactory: () => ({ echarts: () => import() }) }
ChartRealtimeService
MeasurementRealtimeService
AlarmRealtimeService
EventRealtimeService
ChartTypesService
EchartsOptionsService
YAxisService
AlarmSeverityToIconPipe
AlarmSeverityToLabelPipe
|
| selector | c8y-charts |
| standalone | true |
| imports |
CommonModule
CoreModule
NgxEchartsModule
TooltipModule
PopoverModule
ChartAlertsComponent
AlarmsModule
SelectAggregatedDatapointComponent
|
| templateUrl | ./charts.component.html |
Properties |
Methods |
Inputs |
Outputs |
constructor()
|
| alerts |
Type : DynamicComponentAlertAggregator
|
| chartViewContext |
Type : CHART_VIEW_CONTEXT
|
| config |
Type : DatapointsGraphWidgetConfig
|
| configChangeOnZoomOut |
Type : EventEmitter
|
| datapointOutOfSync |
Type : EventEmitter
|
| isMarkedAreaEnabled |
Type : EventEmitter
|
| timeRangeChangeOnRealtime |
Type : EventEmitter
|
| updateActiveDatapoints |
Type : EventEmitter
|
| updateAggregatedSliderDatapoint |
Type : EventEmitter
|
| updateAlarmsAndEvents |
Type : EventEmitter
|
| debounce | |||||||||
debounce(func: T, wait: number)
|
|||||||||
Type parameters :
|
|||||||||
|
Parameters :
Returns :
void
|
| hasMarkArea | ||||||
hasMarkArea(options: any)
|
||||||
|
Parameters :
Returns :
boolean
|
| isAlarmOrEventClick | ||||||
isAlarmOrEventClick(params: any)
|
||||||
|
Parameters :
Returns :
boolean
|
| loadMoreData |
loadMoreData()
|
|
Returns :
void
|
| ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
|
Parameters :
Returns :
void
|
| ngOnDestroy |
ngOnDestroy()
|
|
Returns :
void
|
| ngOnInit |
ngOnInit()
|
|
Returns :
void
|
| onChartClick | ||||||
onChartClick(params: literal type)
|
||||||
|
Parameters :
Returns :
void
|
| onChartInit | ||||||
onChartInit(ec: ECharts)
|
||||||
|
Parameters :
Returns :
void
|
| saveAsImage |
saveAsImage()
|
|
Returns :
void
|
| toggleAlarmEventSeriesVisibility | ||||||||
toggleAlarmEventSeriesVisibility(alarmOrEvent: AlarmDetailsExtended | EventDetailsExtended)
|
||||||||
|
Toggles the visibility of a series in the chart based on the provided alarm or event.
Parameters :
Returns :
void
|
| toggleDatapointSeriesVisibility | ||||||||
toggleDatapointSeriesVisibility(datapoint: DatapointsGraphKPIDetails)
|
||||||||
|
Toggles the visibility of a series in the chart based on the provided datapoint.
Parameters :
Returns :
void
|
| activeDatapoints |
Type : DatapointsGraphKPIDetails[]
|
Default value : []
|
| alarms |
Type : IAlarm[]
|
Default value : []
|
| chart |
Type : ElementRef
|
Decorators :
@ViewChild('chart')
|
| CHART_VIEW_CONTEXT |
Default value : CHART_VIEW_CONTEXT
|
| chartOption$ |
Type : Observable<EChartsOption>
|
| echartsInstance |
Type : ECharts
|
| events |
Type : IEvent[]
|
Default value : []
|
| showLoadMore |
Default value : false
|
| sliderZoomUsed |
Default value : false
|
<div class="p-relative fit-h chart-container">
<div
class="fit-w fit-h"
#chart
echarts
[options]="chartOption$ | async"
(chartInit)="onChartInit($event)"
></div>
<c8y-chart-alerts [alerts]="alerts"></c8y-chart-alerts>
<div
class="chart-load-more"
*ngIf="showLoadMore"
>
<button
class="btn btn-primary btn-block"
(click)="loadMoreData()"
>
<i c8yIcon="restore"></i>
{{ 'Load more' | translate }}
</button>
</div>
<div
class="e-charts--aggregated-datapoint"
*ngIf="
activeDatapoints.length > 1 &&
config?.showSlider &&
chartViewContext !== CHART_VIEW_CONTEXT.WIDGET_VIEW
"
>
<c8y-select-aggregated-datapoint
[value]="config?.aggregatedDatapoint || activeDatapoints[0]"
(valueChange)="updateAggregatedSliderDatapoint.emit($event)"
[activeDatapoints]="activeDatapoints"
></c8y-select-aggregated-datapoint>
</div>
</div>