devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
36 lines (35 loc) • 1.67 kB
JavaScript
/**
* DevExpress HTML/JS Reporting (chart\widgets\_positionSeriesLabelEditor.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 * as ko from 'knockout';
import { barPositionValues, funnelPositionValues, piePositionValues, stackedBarPositionValues, waterfallPositionValues } from '../internal/meta/_chart';
export class PositionSeriesLabelEditor extends Editor {
_positionChooser(type) {
if (type) {
if (['PieSeriesLabel', 'Pie3DSeriesLabel', 'DoughnutSeriesLabel', 'NestedDoughnutSeriesLabel', 'Doughnut3DSeriesLabel'].indexOf(type) !== -1)
return piePositionValues;
if ((['FunnelSeriesLabel', 'Funnel3DSeriesLabel'].indexOf(type) !== -1))
return funnelPositionValues;
if (type === 'WaterfallSeriesLabel')
return waterfallPositionValues;
if ((['StackedBarSeriesLabel', 'FullStackedBarSeriesLabel'].indexOf(type) !== -1)) {
return stackedBarPositionValues;
}
}
return barPositionValues;
}
constructor(info, level, parentDisabled, textToSearch) {
super(info, level, parentDisabled, textToSearch);
this._disposables.push(this.values = ko.pureComputed(() => {
const model = this._get('_model');
if (model && model['typeNameSerializable']) {
return this._positionChooser(model['typeNameSerializable']());
}
}));
}
}