UNPKG

devexpress-reporting

Version:

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

32 lines (31 loc) 1.16 kB
/** * DevExpress HTML/JS Reporting (designer\widgets\gaugeStyleEditor.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 { Editor } from '@devexpress/analytics-core/analytics-widgets'; import * as ko from 'knockout'; import { circularValues, linearValues } from '../controls/xrGauge'; export class GaugeStyleEditor extends Editor { constructor(info, level, parentDisabled, textToSearch) { super(info, 0, parentDisabled, textToSearch); this._viewModel = ko.observable(); this.viewmodel = { items: ko.pureComputed(() => { if (this._viewModel() && this._viewModel().viewType) { return this._viewModel().viewType() === 'Circular' ? circularValues : linearValues; } else { return []; } }) }; this._disposables.push(this.viewmodel.items); } update(viewModel) { super.update(viewModel); this._viewModel(viewModel); } }