devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
43 lines (42 loc) • 1.87 kB
JavaScript
/**
* DevExpress HTML/JS Reporting (chart\components\series\_label.js)
* Version: 25.2.3
* Build date: Dec 15, 2025
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/universal.xml
*/
import { SerializableModel } from '@devexpress/analytics-core/analytics-elements';
import { editorTemplates } from '@devexpress/analytics-core/analytics-widgets';
import { seriesLabelSerializationsInfo } from '../../internal/meta/_series';
export class SeriesLabelViewModel extends SerializableModel {
static from(model, serializer) {
return new SeriesLabelViewModel(model || {}, serializer);
}
static toJson(value, serializer, refs) {
return serializer.serialize(value, seriesLabelSerializationsInfo, refs);
}
constructor(model, serializer) {
super(model, serializer, seriesLabelSerializationsInfo);
if (this.typeNameSerializable) {
this._disposables.push(this.typeNameSerializable.subscribe(val => {
this.seriesLabelPosition(null);
}));
}
}
isPropertyVisible(propertyName) {
if (propertyName === 'showForZeroValues') {
return barTypeNames.includes(this.typeNameSerializable());
}
return true;
}
}
export const seriesLabel = { propertyName: 'label', modelName: 'Label', displayName: 'Label', info: seriesLabelSerializationsInfo, defaultVal: {}, from: SeriesLabelViewModel.from, toJsonObject: SeriesLabelViewModel.toJson, editor: editorTemplates.getEditor('objecteditor'), localizationId: 'DevExpress.XtraReports.UI.XRLabel' };
const barTypeNames = [
'SideBySideBarSeriesLabel',
'StackedBarSeriesLabel',
'FullStackedBarSeriesLabel',
'WaterfallSeriesLabel',
'Bar3DSeriesLabel',
'StackedBar3DSeriesLabel',
'FullStackedBar3DSeriesLabel',
];