UNPKG

devexpress-reporting

Version:

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

27 lines (26 loc) 1.11 kB
/** * DevExpress HTML/JS Reporting (chart\widgets\_pointsEditor.js) * Version: 25.1.3 * Build date: Jun 26, 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 { SeriesPointModel } from '../components/series/_point'; import { createViewModelGenerator } from '@devexpress/analytics-core/analytics-serializer-native'; import { koUtils } from '@devexpress/analytics-core/analytics-internal-native'; export class PointsEditor extends Editor { createViewModel() { return createViewModelGenerator(super.createViewModel()) .generateProperty('addPoint', () => this.addPoint()) .getViewModel(); } constructor(info, level, parentDisabled, textToSearch) { super(info, level, parentDisabled, textToSearch); } addPoint() { const unwrapped = koUtils.unwrap(this._model); const series = unwrapped['owner'] || unwrapped; return SeriesPointModel.createNew(series); } }