Merge pull request #9172 from rusikv/bug/pie-flot-widget-on-slice-click

Fix for pie flot widget slice click action
This commit is contained in:
Igor Kulikov 2023-09-04 18:25:10 +03:00 committed by GitHub
commit 17bd83d0c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}