Skip to content

Commit

Permalink
Charts - Publish SeriesPoint & SeriesLabel types (#25701)
Browse files Browse the repository at this point in the history
Co-authored-by: ilyakhd <[email protected]>
  • Loading branch information
alexanderPolosatov and IlyaKhD authored Oct 20, 2023
1 parent 665fcae commit e95f103
Show file tree
Hide file tree
Showing 16 changed files with 846 additions and 798 deletions.
405 changes: 405 additions & 0 deletions js/common/charts.d.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viz/bar_gauge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import BaseWidget, {
BaseWidgetLoadingIndicator,
BaseWidgetOptions,
BaseWidgetTooltip,
Font,
FileSavingEventInfo,
ExportInfo,
IncidentInfo,
Expand All @@ -37,6 +36,7 @@ import {
Palette,
PaletteExtensionMode,
ShiftLabelOverlap,
Font,
} from '../common/charts';

export {
Expand Down
443 changes: 52 additions & 391 deletions js/viz/chart.d.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions js/viz/chart_components/base_chart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import {
baseSeriesObject,
chartSeriesObject,
dxChartAnnotationConfig,
dxChartSeriesTypesCommonSeriesLabel,
dxChartSeriesTypesCommonSeriesPoint,
} from '../chart';

import {
Expand All @@ -40,6 +38,8 @@ import BaseWidget, {

import {
AnimationEaseMode,
SeriesLabel,
SeriesPoint,
Palette,
PaletteExtensionMode,
} from '../../common/charts';
Expand Down Expand Up @@ -110,14 +110,14 @@ export interface BaseChartOptions<TComponent> extends BaseWidgetOptions<TCompone
* @type_function_return dxChartSeriesTypes.CommonSeries.label
* @public
*/
customizeLabel?: ((pointInfo: any) => dxChartSeriesTypesCommonSeriesLabel);
customizeLabel?: ((pointInfo: any) => SeriesLabel);
/**
* @docid
* @type_function_param1 pointInfo:object
* @type_function_return dxChartSeriesTypes.CommonSeries.point
* @public
*/
customizePoint?: ((pointInfo: any) => dxChartSeriesTypesCommonSeriesPoint);
customizePoint?: ((pointInfo: any) => SeriesPoint);
/**
* @docid BaseChartOptions.dataSource
* @notUsedInTheme
Expand Down
5 changes: 1 addition & 4 deletions js/viz/common.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import {
dxChartSeriesTypesCommonSeries,
} from './chart';

import {
Font,
} from './core/base_widget';

import {
HorizontalAlignment,
Orientation,
Expand All @@ -17,6 +13,7 @@ import {
DashStyle,
LegendMarkerState,
SeriesType as CommonSeriesType,
Font,
} from '../common/charts';

import type * as Common from '../common/charts';
Expand Down
64 changes: 21 additions & 43 deletions js/viz/core/base_widget.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
TextOverflow,
Theme,
WordWrap,
Font as CommonFont,
} from '../../common/charts';

/**
Expand Down Expand Up @@ -277,9 +278,10 @@ export interface BaseWidgetLoadingIndicator {
/**
* @docid BaseWidgetOptions.loadingIndicator.font
* @default '#767676' &prop(color)
* @type Font
* @public
*/
font?: Font;
font?: CommonFont;
/**
* @docid BaseWidgetOptions.loadingIndicator.show
* @default false
Expand Down Expand Up @@ -356,9 +358,10 @@ export interface BaseWidgetTitle {
* @default 28 &prop(size)
* @default 200 &prop(weight)
* @default "'Segoe UI Light', 'Helvetica Neue Light', 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif" &prop(family)
* @type Font
* @public
*/
font?: Font;
font?: CommonFont;
/**
* @docid BaseWidgetOptions.title.horizontalAlignment
* @default 'center'
Expand Down Expand Up @@ -409,8 +412,9 @@ export interface BaseWidgetTitle {
* @default 16 &prop(size)
* @default 200 &prop(weight)
* @default "'Segoe UI Light', 'Helvetica Neue Light', 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif" &prop(family)
* @type Font
*/
font?: Font;
font?: CommonFont;
/**
* @docid BaseWidgetOptions.title.subtitle.offset
* @default 0
Expand Down Expand Up @@ -528,9 +532,10 @@ export interface BaseWidgetTooltip {
/**
* @docid BaseWidgetOptions.tooltip.font
* @default '#232323' &prop(color)
* @type Font
* @public
*/
font?: Font;
font?: CommonFont;
/**
* @docid BaseWidgetOptions.tooltip.format
* @default undefined
Expand Down Expand Up @@ -656,44 +661,6 @@ export default class BaseWidget<TProperties> extends DOMComponent<TProperties> {
svg(): string;
}

/**
* @docid
* @type object
* @namespace DevExpress.viz
* @hidden
*/
export interface Font {
/**
* @docid
* @public
*/
color?: string;
/**
* @docid
* @default "'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif"
* @public
*/
family?: string;
/**
* @docid
* @default 1
* @public
*/
opacity?: number;
/**
* @docid
* @default 12
* @public
*/
size?: string | number;
/**
* @docid
* @default 400
* @public
*/
weight?: number;
}

/**
* @docid
* @type object
Expand Down Expand Up @@ -775,9 +742,10 @@ export interface BaseWidgetAnnotationConfig {
/**
* @docid
* @default '#333333' &prop(color)
* @type Font
* @public
*/
font?: Font;
font?: CommonFont;
/**
* @docid
* @default undefined
Expand Down Expand Up @@ -915,3 +883,13 @@ export interface BaseWidgetAnnotationConfig {
*/
y?: number;
}

// #region deprecated in 23.1

/**
* @namespace DevExpress.viz
* @deprecated Use Font from common/charts instead
*/
export type Font = CommonFont;

// #endregion
2 changes: 1 addition & 1 deletion js/viz/funnel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
import BaseWidget, {
BaseWidgetOptions,
BaseWidgetTooltip,
Font,
FileSavingEventInfo,
ExportInfo,
IncidentInfo,
Expand All @@ -48,6 +47,7 @@ import {
ShiftLabelOverlap,
TextOverflow,
WordWrap,
Font,
} from '../common/charts';

export {
Expand Down
2 changes: 1 addition & 1 deletion js/viz/gauges/base_gauge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import BaseWidget, {
BaseWidgetLoadingIndicator,
BaseWidgetOptions,
BaseWidgetTooltip,
Font,
} from '../core/base_widget';

import {
Expand All @@ -33,6 +32,7 @@ import {
PaletteExtensionMode,
LabelOverlap,
ChartsColor,
Font,
} from '../../common/charts';

/**
Expand Down
2 changes: 1 addition & 1 deletion js/viz/pie_chart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import {
} from './common';

import {
Font,
BaseWidgetAnnotationConfig,
FileSavingEventInfo,
ExportInfo,
Expand All @@ -54,6 +53,7 @@ import {
TextOverflow,
WordWrap,
ChartsColor,
Font,
} from '../common/charts';

export {
Expand Down
2 changes: 1 addition & 1 deletion js/viz/polar_chart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import {
} from '../core/templates/template';

import {
Font,
FileSavingEventInfo,
ExportInfo,
IncidentInfo,
Expand Down Expand Up @@ -68,6 +67,7 @@ import {
VisualRange,
ZoomPanAction,
ChartsColor,
Font,
} from '../common/charts';

/**
Expand Down
2 changes: 1 addition & 1 deletion js/viz/range_selector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
import BaseWidget, {
BaseWidgetOptions,
BaseWidgetTooltip,
Font,
FileSavingEventInfo,
ExportInfo,
IncidentInfo,
Expand All @@ -39,6 +38,7 @@ import {
TimeIntervalConfig,
VisualRange,
VisualRangeUpdateMode,
Font,
} from '../common/charts';

import { SliderValueChangeMode } from '../common';
Expand Down
2 changes: 1 addition & 1 deletion js/viz/sankey.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
import BaseWidget, {
BaseWidgetOptions,
BaseWidgetTooltip,
Font,
FileSavingEventInfo,
ExportInfo,
IncidentInfo,
Expand All @@ -34,6 +33,7 @@ import {
Palette,
PaletteExtensionMode,
TextOverflow,
Font,
} from '../common/charts';

export {
Expand Down
2 changes: 1 addition & 1 deletion js/viz/tree_map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import BaseWidget, {
BaseWidgetMargin,
BaseWidgetOptions,
BaseWidgetTooltip,
Font,
FileSavingEventInfo,
ExportInfo,
IncidentInfo,
Expand All @@ -34,6 +33,7 @@ import {
Palette,
PaletteExtensionMode,
TextOverflow,
Font,
WordWrap,
} from '../common/charts';

Expand Down
2 changes: 1 addition & 1 deletion js/viz/vector_map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import BaseWidget, {
BaseWidgetMargin,
BaseWidgetOptions,
BaseWidgetTooltip,
Font,
BaseWidgetAnnotationConfig,
FileSavingEventInfo,
ExportInfo,
Expand All @@ -43,6 +42,7 @@ import {

import {
Palette,
Font,
} from '../common/charts';

import {
Expand Down
12 changes: 8 additions & 4 deletions ts/aliases.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,18 @@ declare module DevExpress.ui {
}

declare module DevExpress.viz {
/** @deprecated Use DevExpress.common.ScaleBreak instead */
/** @deprecated Use DevExpress.common.charts.ScaleBreak instead */
export type ScaleBreak = DevExpress.common.charts.ScaleBreak
/** @deprecated Use DevExpress.common.SeriesType instead */
/** @deprecated Use DevExpress.common.charts.SeriesType instead */
export type SeriesType = DevExpress.common.charts.SeriesType
/** @deprecated Use DevExpress.common.VisualRange instead */
/** @deprecated Use DevExpress.common.charts.VisualRange instead */
export type VisualRange = DevExpress.common.charts.VisualRange
/** @deprecated Use DevExpress.common.TimeIntervalConfig instead */
/** @deprecated Use DevExpress.common.charts.TimeIntervalConfig instead */
export type VizTimeInterval = DevExpress.common.charts.TimeIntervalConfig
/** @deprecated Use DevExpress.common.charts.SeriesPoint instead */
export type dxChartSeriesTypesCommonSeriesPoint = DevExpress.common.charts.SeriesPoint;
/** @deprecated Use DevExpress.common.charts.SeriesLabel instead */
export type dxChartSeriesTypesCommonSeriesLabel = DevExpress.common.charts.SeriesLabel;
}

// v23.1
Expand Down
Loading

0 comments on commit e95f103

Please sign in to comment.