Browse Source
Merge pull request #9172 from rusikv/bug/pie-flot-widget-on-slice-click
Fix for pie flot widget slice click action
pull/9186/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
4 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts
|
|
|
@ -1621,10 +1621,10 @@ export class TbFlot { |
|
|
|
const descriptors = this.ctx.actionsApi.getActionDescriptors('sliceClick'); |
|
|
|
if ($event && descriptors.length) { |
|
|
|
$event.stopPropagation(); |
|
|
|
const entityInfo = this.ctx.actionsApi.getActiveEntityInfo(); |
|
|
|
const entityId = entityInfo ? entityInfo.entityId : null; |
|
|
|
const entityName = entityInfo ? entityInfo.entityName : null; |
|
|
|
const entityLabel = entityInfo ? entityInfo.entityLabel : null; |
|
|
|
const datasource = item.series.datasource; |
|
|
|
const entityId = datasource ? datasource.entity?.id : null; |
|
|
|
const entityName = datasource ? datasource.entityName : null; |
|
|
|
const entityLabel = datasource ? datasource.entityLabel : null; |
|
|
|
this.ctx.actionsApi.handleWidgetAction($event, descriptors[0], entityId, entityName, item, entityLabel); |
|
|
|
} |
|
|
|
} |
|
|
|
|