UNPKG

devexpress-reporting

Version:

DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.

35 lines (34 loc) 1.29 kB
/** * DevExpress HTML/JS Reporting (designer\actions\chartActions.js) * Version: 24.2.6 * Build date: Mar 18, 2025 * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs/universal.xml */ import { BaseActionsProvider } from '@devexpress/analytics-core/analytics-internal'; import { getLocalization } from '@devexpress/analytics-core/analytics-utils'; import * as ko from 'knockout'; import { XRChartViewModel } from '../controls/xrChart'; export class ChartActions extends BaseActionsProvider { constructor(_buildingModel) { super(); this._buildingModel = _buildingModel; this.initActions([ { text: 'Run Designer', displayText: () => getLocalization('Run Designer', 'ReportStringId.Verb_RunDesigner'), disabled: ko.observable(false), clickAction: () => { if (this._context.surface) _buildingModel?.runChartDesigner(this._context.surface); }, isContextMenuAction: true } ]); } condition(context) { if (context instanceof XRChartViewModel) { this._context = context; return true; } return false; } }