From a60843e61e451748ce8dda0002c301aaafaf69f2 Mon Sep 17 00:00:00 2001 From: "polosatov.alexander" Date: Fri, 20 Oct 2023 15:00:28 +0400 Subject: [PATCH] Charts - Move Font type to common/charts (#25745) Co-authored-by: Mikhail Preyskurantov --- package-lock.json | 8 +- package.json | 2 +- .../devextreme-angular/src/common/charts.ts | 1 + .../src/ui/bar-gauge/index.ts | 3 +- .../devextreme-angular/src/ui/bullet/index.ts | 3 +- .../devextreme-angular/src/ui/chart/index.ts | 3 +- .../src/ui/circular-gauge/index.ts | 3 +- .../devextreme-angular/src/ui/funnel/index.ts | 3 +- .../src/ui/linear-gauge/index.ts | 3 +- .../src/ui/nested/argument-axis.ts | 3 +- .../base/chart-annotation-config-dxi.ts | 3 +- .../base/chart-common-annotation-config.ts | 3 +- .../base/chart-common-series-settings.ts | 3 +- .../src/ui/nested/base/chart-series-dxi.ts | 3 +- .../src/ui/nested/base/gauge-indicator.ts | 3 +- .../src/ui/nested/common-axis-settings.ts | 3 +- .../src/ui/nested/constant-line-dxi.ts | 3 +- .../src/ui/nested/constant-line-style.ts | 3 +- .../src/ui/nested/crosshair.ts | 3 +- .../devextreme-angular/src/ui/nested/group.ts | 3 +- .../src/ui/nested/horizontal-line.ts | 3 +- .../devextreme-angular/src/ui/nested/label.ts | 3 +- .../src/ui/nested/layer-dxi.ts | 3 +- .../src/ui/nested/legend-dxi.ts | 3 +- .../src/ui/nested/legend.ts | 3 +- .../src/ui/nested/loading-indicator.ts | 2 +- .../devextreme-angular/src/ui/nested/scale.ts | 3 +- .../src/ui/nested/slider-marker.ts | 2 +- .../src/ui/nested/strip-dxi.ts | 2 +- .../src/ui/nested/strip-style.ts | 2 +- .../src/ui/nested/subtitle.ts | 3 +- .../devextreme-angular/src/ui/nested/text.ts | 2 +- .../devextreme-angular/src/ui/nested/tile.ts | 3 +- .../devextreme-angular/src/ui/nested/title.ts | 3 +- .../src/ui/nested/tooltip.ts | 3 +- .../src/ui/nested/value-axis-dxi.ts | 3 +- .../src/ui/nested/value-axis.ts | 3 +- .../src/ui/nested/vertical-line.ts | 3 +- .../src/ui/pie-chart/index.ts | 3 +- .../src/ui/polar-chart/index.ts | 3 +- .../src/ui/range-selector/index.ts | 3 +- .../devextreme-angular/src/ui/sankey/index.ts | 3 +- .../src/ui/sparkline/index.ts | 3 +- .../src/ui/tree-map/index.ts | 3 +- .../src/ui/vector-map/index.ts | 3 +- packages/devextreme-react/src/bar-gauge.ts | 32 ++--- packages/devextreme-react/src/bullet.ts | 4 +- packages/devextreme-react/src/chart.ts | 117 +++++++++-------- .../devextreme-react/src/circular-gauge.ts | 23 ++-- .../devextreme-react/src/common/charts.ts | 1 + packages/devextreme-react/src/funnel.ts | 32 ++--- packages/devextreme-react/src/linear-gauge.ts | 23 ++-- packages/devextreme-react/src/pie-chart.ts | 41 +++--- packages/devextreme-react/src/polar-chart.ts | 89 +++++++------ .../devextreme-react/src/range-selector.ts | 25 ++-- packages/devextreme-react/src/sankey.ts | 14 +- packages/devextreme-react/src/sparkline.ts | 4 +- packages/devextreme-react/src/tree-map.ts | 22 ++-- packages/devextreme-react/src/vector-map.ts | 39 +++--- packages/devextreme-vue/src/common/charts.ts | 1 + packages/devextreme/js/common/charts.d.ts | 40 +++++- packages/devextreme/js/viz/bar_gauge.d.ts | 2 +- packages/devextreme/js/viz/chart.d.ts | 2 +- packages/devextreme/js/viz/common.d.ts | 5 +- .../devextreme/js/viz/core/base_widget.d.ts | 64 +++------ packages/devextreme/js/viz/funnel.d.ts | 2 +- .../devextreme/js/viz/gauges/base_gauge.d.ts | 2 +- packages/devextreme/js/viz/pie_chart.d.ts | 2 +- packages/devextreme/js/viz/polar_chart.d.ts | 2 +- .../devextreme/js/viz/range_selector.d.ts | 2 +- packages/devextreme/js/viz/sankey.d.ts | 2 +- packages/devextreme/js/viz/tree_map.d.ts | 2 +- packages/devextreme/js/viz/vector_map.d.ts | 2 +- packages/devextreme/ts/dx.all.d.ts | 121 ++++++++++-------- 74 files changed, 413 insertions(+), 436 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8cc6bc84a6d..a0604cbe91f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@types/shelljs": "0.8.13", "cheerio": "1.0.0-rc.10", "codelyzer": "^6.0.2", - "devextreme-internal-tools": "12.0.0-beta.5", + "devextreme-internal-tools": "12.0.0-beta.6", "eslint": "8.47.0", "eslint-config-airbnb-base": "15.0.0", "eslint-config-airbnb-typescript": "17.0.0", @@ -13499,9 +13499,9 @@ "link": true }, "node_modules/devextreme-internal-tools": { - "version": "12.0.0-beta.5", - "resolved": "https://registry.npmjs.org/devextreme-internal-tools/-/devextreme-internal-tools-12.0.0-beta.5.tgz", - "integrity": "sha512-+E+GwOcjVoC1gCqaJecWFXwXTjuaWTDCL/8ulIjTnxUtB0Fx/+XFC7EKijYRiNDROWKRL/tMIjTUk6aVtfnktw==", + "version": "12.0.0-beta.6", + "resolved": "https://registry.npmjs.org/devextreme-internal-tools/-/devextreme-internal-tools-12.0.0-beta.6.tgz", + "integrity": "sha512-sSfo2xCKgUpxlB6zdEcI49VtS7M1pA4d1nIJwqSM64KNNqI/TQjHRCSTwCRpesvSjwxAwh2fuUW3JiMLOa4ELA==", "dev": true, "dependencies": { "dasherize": "2.0.0", diff --git a/package.json b/package.json index cad8c26cf3a1..8d2df3407089 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@types/shelljs": "0.8.13", "cheerio": "1.0.0-rc.10", "codelyzer": "^6.0.2", - "devextreme-internal-tools": "12.0.0-beta.5", + "devextreme-internal-tools": "12.0.0-beta.6", "eslint": "8.47.0", "eslint-config-airbnb-base": "15.0.0", "eslint-config-airbnb-typescript": "17.0.0", diff --git a/packages/devextreme-angular/src/common/charts.ts b/packages/devextreme-angular/src/common/charts.ts index 602589860ebd..b1c62de3dd62 100644 --- a/packages/devextreme-angular/src/common/charts.ts +++ b/packages/devextreme-angular/src/common/charts.ts @@ -9,6 +9,7 @@ export { ChartsLabelOverlap, DashStyle, DiscreteAxisDivisionMode, + Font, GradientColor, HatchDirection, LabelOverlap, diff --git a/packages/devextreme-angular/src/ui/bar-gauge/index.ts b/packages/devextreme-angular/src/ui/bar-gauge/index.ts index 0a80d521bc13..4060e65fedab 100644 --- a/packages/devextreme-angular/src/ui/bar-gauge/index.ts +++ b/packages/devextreme-angular/src/ui/bar-gauge/index.ts @@ -22,11 +22,10 @@ import { import { ExportFormat, HorizontalAlignment, Orientation, Position, VerticalEdge } from 'devextreme/common'; -import { AnimationEaseMode, DashStyle, Palette, PaletteExtensionMode, ShiftLabelOverlap, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; +import { AnimationEaseMode, DashStyle, Font, Palette, PaletteExtensionMode, ShiftLabelOverlap, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Format } from 'devextreme/localization'; import { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, OptionChangedEvent, TooltipHiddenEvent, TooltipShownEvent } from 'devextreme/viz/bar_gauge'; -import { Font } from 'devextreme/viz/core/base_widget'; import DxBarGauge from 'devextreme/viz/bar_gauge'; diff --git a/packages/devextreme-angular/src/ui/bullet/index.ts b/packages/devextreme-angular/src/ui/bullet/index.ts index ca3f1f4c4217..a7a2613306ee 100644 --- a/packages/devextreme-angular/src/ui/bullet/index.ts +++ b/packages/devextreme-angular/src/ui/bullet/index.ts @@ -18,11 +18,10 @@ import { } from '@angular/core'; -import { DashStyle, Theme } from 'devextreme/common/charts'; +import { DashStyle, Font, Theme } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Format } from 'devextreme/localization'; import { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, OptionChangedEvent, TooltipHiddenEvent, TooltipShownEvent } from 'devextreme/viz/bullet'; -import { Font } from 'devextreme/viz/core/base_widget'; import DxBullet from 'devextreme/viz/bullet'; diff --git a/packages/devextreme-angular/src/ui/chart/index.ts b/packages/devextreme-angular/src/ui/chart/index.ts index e5183df7799a..7be1e5828bc2 100644 --- a/packages/devextreme-angular/src/ui/chart/index.ts +++ b/packages/devextreme-angular/src/ui/chart/index.ts @@ -25,13 +25,12 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { ExportFormat, HorizontalAlignment, Orientation, Position, SingleOrMultiple, VerticalAlignment, VerticalEdge } from 'devextreme/common'; -import { AnimationEaseMode, ArgumentAxisHoverMode, AxisScaleType, ChartsAxisLabelOverlap, ChartsDataType, ChartsLabelOverlap, DashStyle, DiscreteAxisDivisionMode, LegendHoverMode, Palette, PaletteExtensionMode, RelativePosition, ScaleBreakLineStyle, TextOverflow, Theme, TimeInterval, VisualRangeUpdateMode, WordWrap } from 'devextreme/common/charts'; +import { AnimationEaseMode, ArgumentAxisHoverMode, AxisScaleType, ChartsAxisLabelOverlap, ChartsDataType, ChartsLabelOverlap, DashStyle, DiscreteAxisDivisionMode, Font, LegendHoverMode, Palette, PaletteExtensionMode, RelativePosition, ScaleBreakLineStyle, TextOverflow, Theme, TimeInterval, VisualRangeUpdateMode, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Format } from 'devextreme/localization'; import { AggregatedPointsPosition, ArgumentAxisClickEvent, ChartLabelDisplayMode, ChartTooltipLocation, ChartZoomAndPanMode, DisposingEvent, DoneEvent, DrawnEvent, dxChartCommonAnnotationConfig, EventKeyModifier, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LegendClickEvent, OptionChangedEvent, PointClickEvent, PointHoverChangedEvent, PointSelectionChangedEvent, SeriesClickEvent, SeriesHoverChangedEvent, SeriesSelectionChangedEvent, TooltipHiddenEvent, TooltipShownEvent, ZoomEndEvent, ZoomStartEvent } from 'devextreme/viz/chart'; -import { Font } from 'devextreme/viz/core/base_widget'; import DxChart from 'devextreme/viz/chart'; diff --git a/packages/devextreme-angular/src/ui/circular-gauge/index.ts b/packages/devextreme-angular/src/ui/circular-gauge/index.ts index aa977a2bd74d..95808f5f753f 100644 --- a/packages/devextreme-angular/src/ui/circular-gauge/index.ts +++ b/packages/devextreme-angular/src/ui/circular-gauge/index.ts @@ -23,11 +23,10 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { ExportFormat, HorizontalAlignment, VerticalEdge } from 'devextreme/common'; -import { AnimationEaseMode, DashStyle, LabelOverlap, Palette, PaletteExtensionMode, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; +import { AnimationEaseMode, DashStyle, Font, LabelOverlap, Palette, PaletteExtensionMode, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Format } from 'devextreme/localization'; import { CircularGaugeElementOrientation, CircularGaugeLabelOverlap, DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, OptionChangedEvent, TooltipHiddenEvent, TooltipShownEvent } from 'devextreme/viz/circular_gauge'; -import { Font } from 'devextreme/viz/core/base_widget'; import DxCircularGauge from 'devextreme/viz/circular_gauge'; diff --git a/packages/devextreme-angular/src/ui/funnel/index.ts b/packages/devextreme-angular/src/ui/funnel/index.ts index 3cdceafee0a2..2833850dbbd0 100644 --- a/packages/devextreme-angular/src/ui/funnel/index.ts +++ b/packages/devextreme-angular/src/ui/funnel/index.ts @@ -22,12 +22,11 @@ import { import { ExportFormat, HorizontalAlignment, HorizontalEdge, Orientation, Position, SingleMultipleOrNone, VerticalEdge } from 'devextreme/common'; -import { DashStyle, HatchDirection, LabelPosition, Palette, PaletteExtensionMode, ShiftLabelOverlap, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; +import { DashStyle, Font, HatchDirection, LabelPosition, Palette, PaletteExtensionMode, ShiftLabelOverlap, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, FunnelAlgorithm, HoverChangedEvent, IncidentOccurredEvent, InitializedEvent, ItemClickEvent, LegendClickEvent, OptionChangedEvent, SelectionChangedEvent } from 'devextreme/viz/funnel'; import DxFunnel from 'devextreme/viz/funnel'; diff --git a/packages/devextreme-angular/src/ui/linear-gauge/index.ts b/packages/devextreme-angular/src/ui/linear-gauge/index.ts index 98930be30abb..7cdaad359811 100644 --- a/packages/devextreme-angular/src/ui/linear-gauge/index.ts +++ b/packages/devextreme-angular/src/ui/linear-gauge/index.ts @@ -23,10 +23,9 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { ExportFormat, HorizontalAlignment, Orientation, VerticalAlignment, VerticalEdge } from 'devextreme/common'; -import { AnimationEaseMode, DashStyle, LabelOverlap, Palette, PaletteExtensionMode, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; +import { AnimationEaseMode, DashStyle, Font, LabelOverlap, Palette, PaletteExtensionMode, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, OptionChangedEvent, TooltipHiddenEvent, TooltipShownEvent } from 'devextreme/viz/linear_gauge'; import DxLinearGauge from 'devextreme/viz/linear_gauge'; diff --git a/packages/devextreme-angular/src/ui/nested/argument-axis.ts b/packages/devextreme-angular/src/ui/nested/argument-axis.ts index bf485212862a..5c252a610d45 100644 --- a/packages/devextreme-angular/src/ui/nested/argument-axis.ts +++ b/packages/devextreme-angular/src/ui/nested/argument-axis.ts @@ -21,10 +21,9 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { HorizontalAlignment, Position, VerticalAlignment } from 'devextreme/common'; -import { ArgumentAxisHoverMode, AxisScaleType, ChartsAxisLabelOverlap, ChartsDataType, DashStyle, DiscreteAxisDivisionMode, LabelOverlap, RelativePosition, ScaleBreakLineStyle, TextOverflow, TimeInterval, VisualRangeUpdateMode, WordWrap } from 'devextreme/common/charts'; +import { ArgumentAxisHoverMode, AxisScaleType, ChartsAxisLabelOverlap, ChartsDataType, DashStyle, DiscreteAxisDivisionMode, Font, LabelOverlap, RelativePosition, ScaleBreakLineStyle, TextOverflow, TimeInterval, VisualRangeUpdateMode, WordWrap } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; import { AggregatedPointsPosition, ChartLabelDisplayMode } from 'devextreme/viz/chart'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/base/chart-annotation-config-dxi.ts b/packages/devextreme-angular/src/ui/nested/base/chart-annotation-config-dxi.ts index 2deb82f44e4b..c9f3d9f1379d 100644 --- a/packages/devextreme-angular/src/ui/nested/base/chart-annotation-config-dxi.ts +++ b/packages/devextreme-angular/src/ui/nested/base/chart-annotation-config-dxi.ts @@ -5,8 +5,7 @@ import { Component, } from '@angular/core'; -import { AnnotationType, DashStyle, TextOverflow, WordWrap } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { AnnotationType, DashStyle, Font, TextOverflow, WordWrap } from 'devextreme/common/charts'; import { PieChartAnnotationLocation } from 'devextreme/viz/pie_chart'; @Component({ diff --git a/packages/devextreme-angular/src/ui/nested/base/chart-common-annotation-config.ts b/packages/devextreme-angular/src/ui/nested/base/chart-common-annotation-config.ts index 1d41670298a1..8ebdf62cf167 100644 --- a/packages/devextreme-angular/src/ui/nested/base/chart-common-annotation-config.ts +++ b/packages/devextreme-angular/src/ui/nested/base/chart-common-annotation-config.ts @@ -5,8 +5,7 @@ import { Component, } from '@angular/core'; -import { AnnotationType, DashStyle, TextOverflow, WordWrap } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { AnnotationType, DashStyle, Font, TextOverflow, WordWrap } from 'devextreme/common/charts'; import { PieChartAnnotationLocation } from 'devextreme/viz/pie_chart'; @Component({ diff --git a/packages/devextreme-angular/src/ui/nested/base/chart-common-series-settings.ts b/packages/devextreme-angular/src/ui/nested/base/chart-common-series-settings.ts index da8697fb131f..5e753066dc4c 100644 --- a/packages/devextreme-angular/src/ui/nested/base/chart-common-series-settings.ts +++ b/packages/devextreme-angular/src/ui/nested/base/chart-common-series-settings.ts @@ -7,10 +7,9 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { HorizontalAlignment } from 'devextreme/common'; -import { ChartsDataType, DashStyle, HatchDirection, LabelPosition, PointInteractionMode, PointSymbol, RelativePosition, SeriesHoverMode, SeriesSelectionMode, SeriesType, TextOverflow, ValueErrorBarDisplayMode, ValueErrorBarType, WordWrap } from 'devextreme/common/charts'; +import { ChartsDataType, DashStyle, Font, HatchDirection, LabelPosition, PointInteractionMode, PointSymbol, RelativePosition, SeriesHoverMode, SeriesSelectionMode, SeriesType, TextOverflow, ValueErrorBarDisplayMode, ValueErrorBarType, WordWrap } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; import { ChartSeriesAggregationMethod, FinancialChartReductionLevel } from 'devextreme/viz/chart'; -import { Font } from 'devextreme/viz/core/base_widget'; import { PieChartSeriesInteractionMode, SmallValuesGroupingMode } from 'devextreme/viz/pie_chart'; import { PolarChartSeriesType } from 'devextreme/viz/polar_chart'; diff --git a/packages/devextreme-angular/src/ui/nested/base/chart-series-dxi.ts b/packages/devextreme-angular/src/ui/nested/base/chart-series-dxi.ts index 4a901431eead..7230c84d4623 100644 --- a/packages/devextreme-angular/src/ui/nested/base/chart-series-dxi.ts +++ b/packages/devextreme-angular/src/ui/nested/base/chart-series-dxi.ts @@ -7,10 +7,9 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { HorizontalAlignment } from 'devextreme/common'; -import { ChartsDataType, DashStyle, HatchDirection, LabelPosition, PointInteractionMode, PointSymbol, RelativePosition, SeriesHoverMode, SeriesSelectionMode, SeriesType, TextOverflow, ValueErrorBarDisplayMode, ValueErrorBarType, WordWrap } from 'devextreme/common/charts'; +import { ChartsDataType, DashStyle, Font, HatchDirection, LabelPosition, PointInteractionMode, PointSymbol, RelativePosition, SeriesHoverMode, SeriesSelectionMode, SeriesType, TextOverflow, ValueErrorBarDisplayMode, ValueErrorBarType, WordWrap } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; import { ChartSeriesAggregationMethod, FinancialChartReductionLevel } from 'devextreme/viz/chart'; -import { Font } from 'devextreme/viz/core/base_widget'; import { PieChartSeriesInteractionMode, SmallValuesGroupingMode } from 'devextreme/viz/pie_chart'; import { PolarChartSeriesType } from 'devextreme/viz/polar_chart'; diff --git a/packages/devextreme-angular/src/ui/nested/base/gauge-indicator.ts b/packages/devextreme-angular/src/ui/nested/base/gauge-indicator.ts index 7185aa03fc90..02167f01c930 100644 --- a/packages/devextreme-angular/src/ui/nested/base/gauge-indicator.ts +++ b/packages/devextreme-angular/src/ui/nested/base/gauge-indicator.ts @@ -7,9 +7,8 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { HorizontalEdge, VerticalEdge } from 'devextreme/common'; -import { Palette } from 'devextreme/common/charts'; +import { Font, Palette } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; @Component({ template: '' diff --git a/packages/devextreme-angular/src/ui/nested/common-axis-settings.ts b/packages/devextreme-angular/src/ui/nested/common-axis-settings.ts index 2cdb107b685b..6a82b9defceb 100644 --- a/packages/devextreme-angular/src/ui/nested/common-axis-settings.ts +++ b/packages/devextreme-angular/src/ui/nested/common-axis-settings.ts @@ -15,9 +15,8 @@ import { import { HorizontalAlignment, Position, VerticalAlignment } from 'devextreme/common'; -import { ChartsAxisLabelOverlap, DashStyle, DiscreteAxisDivisionMode, LabelOverlap, RelativePosition, ScaleBreakLineStyle, TextOverflow, WordWrap } from 'devextreme/common/charts'; +import { ChartsAxisLabelOverlap, DashStyle, DiscreteAxisDivisionMode, Font, LabelOverlap, RelativePosition, ScaleBreakLineStyle, TextOverflow, WordWrap } from 'devextreme/common/charts'; import { AggregatedPointsPosition, ChartLabelDisplayMode } from 'devextreme/viz/chart'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/constant-line-dxi.ts b/packages/devextreme-angular/src/ui/nested/constant-line-dxi.ts index ea773a9c00c0..782c4f45ddc1 100644 --- a/packages/devextreme-angular/src/ui/nested/constant-line-dxi.ts +++ b/packages/devextreme-angular/src/ui/nested/constant-line-dxi.ts @@ -13,8 +13,7 @@ import { import { HorizontalAlignment, VerticalAlignment } from 'devextreme/common'; -import { DashStyle, RelativePosition } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { DashStyle, Font, RelativePosition } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/constant-line-style.ts b/packages/devextreme-angular/src/ui/nested/constant-line-style.ts index 10410f791259..a22d3c82c3b4 100644 --- a/packages/devextreme-angular/src/ui/nested/constant-line-style.ts +++ b/packages/devextreme-angular/src/ui/nested/constant-line-style.ts @@ -15,8 +15,7 @@ import { import { HorizontalAlignment, VerticalAlignment } from 'devextreme/common'; -import { DashStyle, RelativePosition } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { DashStyle, Font, RelativePosition } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/crosshair.ts b/packages/devextreme-angular/src/ui/nested/crosshair.ts index 964c4bdeaf93..4ebdfbfb59bf 100644 --- a/packages/devextreme-angular/src/ui/nested/crosshair.ts +++ b/packages/devextreme-angular/src/ui/nested/crosshair.ts @@ -14,9 +14,8 @@ import { -import { DashStyle } from 'devextreme/common/charts'; +import { DashStyle, Font } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/group.ts b/packages/devextreme-angular/src/ui/nested/group.ts index 8d351429d1e0..488ccec65483 100644 --- a/packages/devextreme-angular/src/ui/nested/group.ts +++ b/packages/devextreme-angular/src/ui/nested/group.ts @@ -14,8 +14,7 @@ import { -import { TextOverflow } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { Font, TextOverflow } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/horizontal-line.ts b/packages/devextreme-angular/src/ui/nested/horizontal-line.ts index 1264e4ad3ab8..80f837bfbb98 100644 --- a/packages/devextreme-angular/src/ui/nested/horizontal-line.ts +++ b/packages/devextreme-angular/src/ui/nested/horizontal-line.ts @@ -14,9 +14,8 @@ import { -import { DashStyle } from 'devextreme/common/charts'; +import { DashStyle, Font } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/label.ts b/packages/devextreme-angular/src/ui/nested/label.ts index 23e77b1fd31d..aecc0f04fcbc 100644 --- a/packages/devextreme-angular/src/ui/nested/label.ts +++ b/packages/devextreme-angular/src/ui/nested/label.ts @@ -15,12 +15,11 @@ import { import { HorizontalAlignment, HorizontalEdge, Position, VerticalAlignment, VerticalEdge } from 'devextreme/common'; -import { ChartsAxisLabelOverlap, DashStyle, LabelOverlap, LabelPosition, RelativePosition, TextOverflow, WordWrap } from 'devextreme/common/charts'; +import { ChartsAxisLabelOverlap, DashStyle, Font, LabelOverlap, LabelPosition, RelativePosition, TextOverflow, WordWrap } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; import { LabelLocation } from 'devextreme/ui/form'; import { ChartLabelDisplayMode } from 'devextreme/viz/chart'; import { CircularGaugeLabelOverlap } from 'devextreme/viz/circular_gauge'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/layer-dxi.ts b/packages/devextreme-angular/src/ui/nested/layer-dxi.ts index 0cd1242d345f..f5a6d241bb4a 100644 --- a/packages/devextreme-angular/src/ui/nested/layer-dxi.ts +++ b/packages/devextreme-angular/src/ui/nested/layer-dxi.ts @@ -13,10 +13,9 @@ import { import { SingleMultipleOrNone } from 'devextreme/common'; -import { Palette } from 'devextreme/common/charts'; +import { Font, Palette } from 'devextreme/common/charts'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; -import { Font } from 'devextreme/viz/core/base_widget'; import { VectorMapLayerType, VectorMapMarkerType } from 'devextreme/viz/vector_map'; import { diff --git a/packages/devextreme-angular/src/ui/nested/legend-dxi.ts b/packages/devextreme-angular/src/ui/nested/legend-dxi.ts index 23219c18e497..3e5c931de6ba 100644 --- a/packages/devextreme-angular/src/ui/nested/legend-dxi.ts +++ b/packages/devextreme-angular/src/ui/nested/legend-dxi.ts @@ -13,8 +13,7 @@ import { import { HorizontalAlignment, Orientation, Position, VerticalEdge } from 'devextreme/common'; -import { DashStyle } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { DashStyle, Font } from 'devextreme/common/charts'; import { VectorMapMarkerShape } from 'devextreme/viz/vector_map'; import { diff --git a/packages/devextreme-angular/src/ui/nested/legend.ts b/packages/devextreme-angular/src/ui/nested/legend.ts index 0f1310adb165..8cf1ed2c4038 100644 --- a/packages/devextreme-angular/src/ui/nested/legend.ts +++ b/packages/devextreme-angular/src/ui/nested/legend.ts @@ -15,9 +15,8 @@ import { import { HorizontalAlignment, Orientation, Position, VerticalEdge } from 'devextreme/common'; -import { DashStyle, LegendHoverMode, RelativePosition } from 'devextreme/common/charts'; +import { DashStyle, Font, LegendHoverMode, RelativePosition } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { PieChartLegendHoverMode } from 'devextreme/viz/pie_chart'; import { diff --git a/packages/devextreme-angular/src/ui/nested/loading-indicator.ts b/packages/devextreme-angular/src/ui/nested/loading-indicator.ts index 569f5d014bbd..6df5037d5b84 100644 --- a/packages/devextreme-angular/src/ui/nested/loading-indicator.ts +++ b/packages/devextreme-angular/src/ui/nested/loading-indicator.ts @@ -16,7 +16,7 @@ import { -import { Font } from 'devextreme/viz/core/base_widget'; +import { Font } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/scale.ts b/packages/devextreme-angular/src/ui/nested/scale.ts index 2a4b80ce66b8..46162bbfc5af 100644 --- a/packages/devextreme-angular/src/ui/nested/scale.ts +++ b/packages/devextreme-angular/src/ui/nested/scale.ts @@ -19,10 +19,9 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { HorizontalAlignment, VerticalAlignment } from 'devextreme/common'; -import { ChartsDataType, DiscreteAxisDivisionMode, LabelOverlap, ScaleBreakLineStyle, TimeInterval } from 'devextreme/common/charts'; +import { ChartsDataType, DiscreteAxisDivisionMode, Font, LabelOverlap, ScaleBreakLineStyle, TimeInterval } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; import { CircularGaugeElementOrientation, CircularGaugeLabelOverlap } from 'devextreme/viz/circular_gauge'; -import { Font } from 'devextreme/viz/core/base_widget'; import { AxisScale } from 'devextreme/viz/range_selector'; import { diff --git a/packages/devextreme-angular/src/ui/nested/slider-marker.ts b/packages/devextreme-angular/src/ui/nested/slider-marker.ts index b2f769094b65..0da3ebd79507 100644 --- a/packages/devextreme-angular/src/ui/nested/slider-marker.ts +++ b/packages/devextreme-angular/src/ui/nested/slider-marker.ts @@ -14,8 +14,8 @@ import { +import { Font } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/strip-dxi.ts b/packages/devextreme-angular/src/ui/nested/strip-dxi.ts index 1d6a927668bc..59ffb9cb29c2 100644 --- a/packages/devextreme-angular/src/ui/nested/strip-dxi.ts +++ b/packages/devextreme-angular/src/ui/nested/strip-dxi.ts @@ -13,7 +13,7 @@ import { import { HorizontalAlignment, VerticalAlignment } from 'devextreme/common'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { Font } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/strip-style.ts b/packages/devextreme-angular/src/ui/nested/strip-style.ts index edbd6a4ded06..1b88d2e4cb08 100644 --- a/packages/devextreme-angular/src/ui/nested/strip-style.ts +++ b/packages/devextreme-angular/src/ui/nested/strip-style.ts @@ -15,7 +15,7 @@ import { import { HorizontalAlignment, VerticalAlignment } from 'devextreme/common'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { Font } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/subtitle.ts b/packages/devextreme-angular/src/ui/nested/subtitle.ts index 083f91090ab8..437a1d355b63 100644 --- a/packages/devextreme-angular/src/ui/nested/subtitle.ts +++ b/packages/devextreme-angular/src/ui/nested/subtitle.ts @@ -14,8 +14,7 @@ import { -import { TextOverflow, WordWrap } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { Font, TextOverflow, WordWrap } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/text.ts b/packages/devextreme-angular/src/ui/nested/text.ts index e38211f016a7..22fd2330441e 100644 --- a/packages/devextreme-angular/src/ui/nested/text.ts +++ b/packages/devextreme-angular/src/ui/nested/text.ts @@ -14,8 +14,8 @@ import { +import { Font } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/tile.ts b/packages/devextreme-angular/src/ui/nested/tile.ts index 71e6f49c3b92..6c7a98702ab6 100644 --- a/packages/devextreme-angular/src/ui/nested/tile.ts +++ b/packages/devextreme-angular/src/ui/nested/tile.ts @@ -14,8 +14,7 @@ import { -import { TextOverflow, WordWrap } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { Font, TextOverflow, WordWrap } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/title.ts b/packages/devextreme-angular/src/ui/nested/title.ts index 9334871095dc..a3ae41fbe562 100644 --- a/packages/devextreme-angular/src/ui/nested/title.ts +++ b/packages/devextreme-angular/src/ui/nested/title.ts @@ -15,8 +15,7 @@ import { import { HorizontalAlignment, VerticalEdge } from 'devextreme/common'; -import { TextOverflow, WordWrap } from 'devextreme/common/charts'; -import { Font } from 'devextreme/viz/core/base_widget'; +import { Font, TextOverflow, WordWrap } from 'devextreme/common/charts'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/tooltip.ts b/packages/devextreme-angular/src/ui/nested/tooltip.ts index e580d30650db..d86d53fb2e30 100644 --- a/packages/devextreme-angular/src/ui/nested/tooltip.ts +++ b/packages/devextreme-angular/src/ui/nested/tooltip.ts @@ -15,11 +15,10 @@ import { import { TooltipShowMode, VerticalEdge } from 'devextreme/common'; -import { DashStyle } from 'devextreme/common/charts'; +import { DashStyle, Font } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Format } from 'devextreme/localization'; import { ChartTooltipLocation } from 'devextreme/viz/chart'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/value-axis-dxi.ts b/packages/devextreme-angular/src/ui/nested/value-axis-dxi.ts index 8c54a8fc66e2..d0b8e7bbf33a 100644 --- a/packages/devextreme-angular/src/ui/nested/value-axis-dxi.ts +++ b/packages/devextreme-angular/src/ui/nested/value-axis-dxi.ts @@ -19,10 +19,9 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { HorizontalAlignment, Position, VerticalAlignment } from 'devextreme/common'; -import { AxisScaleType, ChartsAxisLabelOverlap, ChartsDataType, DashStyle, DiscreteAxisDivisionMode, RelativePosition, ScaleBreakLineStyle, TextOverflow, TimeInterval, VisualRangeUpdateMode, WordWrap } from 'devextreme/common/charts'; +import { AxisScaleType, ChartsAxisLabelOverlap, ChartsDataType, DashStyle, DiscreteAxisDivisionMode, Font, RelativePosition, ScaleBreakLineStyle, TextOverflow, TimeInterval, VisualRangeUpdateMode, WordWrap } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; import { AggregatedPointsPosition, ChartLabelDisplayMode } from 'devextreme/viz/chart'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/nested/value-axis.ts b/packages/devextreme-angular/src/ui/nested/value-axis.ts index bc1349f8bf86..883c515feb06 100644 --- a/packages/devextreme-angular/src/ui/nested/value-axis.ts +++ b/packages/devextreme-angular/src/ui/nested/value-axis.ts @@ -20,9 +20,8 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; -import { AxisScaleType, ChartsDataType, DashStyle, DiscreteAxisDivisionMode, LabelOverlap, TimeInterval } from 'devextreme/common/charts'; +import { AxisScaleType, ChartsDataType, DashStyle, DiscreteAxisDivisionMode, Font, LabelOverlap, TimeInterval } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { ValueAxisVisualRangeUpdateMode } from 'devextreme/viz/polar_chart'; import { ChartAxisScale } from 'devextreme/viz/range_selector'; diff --git a/packages/devextreme-angular/src/ui/nested/vertical-line.ts b/packages/devextreme-angular/src/ui/nested/vertical-line.ts index e7dba82ba8f9..3d0da13e4fdc 100644 --- a/packages/devextreme-angular/src/ui/nested/vertical-line.ts +++ b/packages/devextreme-angular/src/ui/nested/vertical-line.ts @@ -14,9 +14,8 @@ import { -import { DashStyle } from 'devextreme/common/charts'; +import { DashStyle, Font } from 'devextreme/common/charts'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { NestedOptionHost, diff --git a/packages/devextreme-angular/src/ui/pie-chart/index.ts b/packages/devextreme-angular/src/ui/pie-chart/index.ts index 17fc3b83ac81..e9c050c75d9f 100644 --- a/packages/devextreme-angular/src/ui/pie-chart/index.ts +++ b/packages/devextreme-angular/src/ui/pie-chart/index.ts @@ -25,12 +25,11 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { ExportFormat, HorizontalAlignment, Orientation, Position, SingleOrMultiple, VerticalEdge } from 'devextreme/common'; -import { AnimationEaseMode, DashStyle, Palette, PaletteExtensionMode, ShiftLabelOverlap, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; +import { AnimationEaseMode, DashStyle, Font, Palette, PaletteExtensionMode, ShiftLabelOverlap, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { DisposingEvent, DoneEvent, DrawnEvent, dxPieChartCommonAnnotationConfig, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LegendClickEvent, OptionChangedEvent, PieChartLegendHoverMode, PieChartSegmentDirection, PieChartType, PointClickEvent, PointHoverChangedEvent, PointSelectionChangedEvent, TooltipHiddenEvent, TooltipShownEvent } from 'devextreme/viz/pie_chart'; import DxPieChart from 'devextreme/viz/pie_chart'; diff --git a/packages/devextreme-angular/src/ui/polar-chart/index.ts b/packages/devextreme-angular/src/ui/polar-chart/index.ts index 6036cbe8f5f7..a75cfaa18bda 100644 --- a/packages/devextreme-angular/src/ui/polar-chart/index.ts +++ b/packages/devextreme-angular/src/ui/polar-chart/index.ts @@ -25,12 +25,11 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { ExportFormat, HorizontalAlignment, Orientation, Position, SingleOrMultiple, VerticalEdge } from 'devextreme/common'; -import { AnimationEaseMode, ArgumentAxisHoverMode, AxisScaleType, ChartsDataType, DashStyle, DiscreteAxisDivisionMode, LabelOverlap, LegendHoverMode, Palette, PaletteExtensionMode, TextOverflow, Theme, TimeInterval, WordWrap } from 'devextreme/common/charts'; +import { AnimationEaseMode, ArgumentAxisHoverMode, AxisScaleType, ChartsDataType, DashStyle, DiscreteAxisDivisionMode, Font, LabelOverlap, LegendHoverMode, Palette, PaletteExtensionMode, TextOverflow, Theme, TimeInterval, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { DisposingEvent, DoneEvent, DrawnEvent, dxPolarChartCommonAnnotationConfig, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LegendClickEvent, OptionChangedEvent, PointClickEvent, PointHoverChangedEvent, PointSelectionChangedEvent, SeriesClickEvent, SeriesHoverChangedEvent, SeriesSelectionChangedEvent, TooltipHiddenEvent, TooltipShownEvent, ValueAxisVisualRangeUpdateMode, ZoomEndEvent, ZoomStartEvent } from 'devextreme/viz/polar_chart'; import DxPolarChart from 'devextreme/viz/polar_chart'; diff --git a/packages/devextreme-angular/src/ui/range-selector/index.ts b/packages/devextreme-angular/src/ui/range-selector/index.ts index 044341922c22..71c70ec3b34e 100644 --- a/packages/devextreme-angular/src/ui/range-selector/index.ts +++ b/packages/devextreme-angular/src/ui/range-selector/index.ts @@ -25,11 +25,10 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { ExportFormat, HorizontalAlignment, SliderValueChangeMode, VerticalEdge } from 'devextreme/common'; -import { ChartsDataType, DiscreteAxisDivisionMode, LabelOverlap, Palette, PaletteExtensionMode, ScaleBreakLineStyle, TextOverflow, Theme, TimeInterval, VisualRangeUpdateMode, WordWrap } from 'devextreme/common/charts'; +import { ChartsDataType, DiscreteAxisDivisionMode, Font, LabelOverlap, Palette, PaletteExtensionMode, ScaleBreakLineStyle, TextOverflow, Theme, TimeInterval, VisualRangeUpdateMode, WordWrap } from 'devextreme/common/charts'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { AxisScale, BackgroundImageLocation, ChartAxisScale, DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, OptionChangedEvent, ValueChangedCallMode, ValueChangedEvent } from 'devextreme/viz/range_selector'; import DxRangeSelector from 'devextreme/viz/range_selector'; diff --git a/packages/devextreme-angular/src/ui/sankey/index.ts b/packages/devextreme-angular/src/ui/sankey/index.ts index 08479be90e89..34fd5febdfa3 100644 --- a/packages/devextreme-angular/src/ui/sankey/index.ts +++ b/packages/devextreme-angular/src/ui/sankey/index.ts @@ -22,12 +22,11 @@ import { import { ExportFormat, HorizontalAlignment, VerticalAlignment, VerticalEdge } from 'devextreme/common'; -import { DashStyle, HatchDirection, Palette, PaletteExtensionMode, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; +import { DashStyle, Font, HatchDirection, Palette, PaletteExtensionMode, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LinkClickEvent, LinkHoverEvent, NodeClickEvent, NodeHoverEvent, OptionChangedEvent, SankeyColorMode } from 'devextreme/viz/sankey'; import DxSankey from 'devextreme/viz/sankey'; diff --git a/packages/devextreme-angular/src/ui/sparkline/index.ts b/packages/devextreme-angular/src/ui/sparkline/index.ts index efc75a1e18c4..e37898228480 100644 --- a/packages/devextreme-angular/src/ui/sparkline/index.ts +++ b/packages/devextreme-angular/src/ui/sparkline/index.ts @@ -21,12 +21,11 @@ import { } from '@angular/core'; -import { DashStyle, PointSymbol, Theme } from 'devextreme/common/charts'; +import { DashStyle, Font, PointSymbol, Theme } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, OptionChangedEvent, SparklineType, TooltipHiddenEvent, TooltipShownEvent } from 'devextreme/viz/sparkline'; import DxSparkline from 'devextreme/viz/sparkline'; diff --git a/packages/devextreme-angular/src/ui/tree-map/index.ts b/packages/devextreme-angular/src/ui/tree-map/index.ts index 2de45b42ad11..708a0d2721ad 100644 --- a/packages/devextreme-angular/src/ui/tree-map/index.ts +++ b/packages/devextreme-angular/src/ui/tree-map/index.ts @@ -22,12 +22,11 @@ import { import { ExportFormat, HorizontalAlignment, SingleMultipleOrNone, VerticalEdge } from 'devextreme/common'; -import { DashStyle, Palette, PaletteExtensionMode, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; +import { DashStyle, Font, Palette, PaletteExtensionMode, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Format } from 'devextreme/localization'; -import { Font } from 'devextreme/viz/core/base_widget'; import { ClickEvent, DisposingEvent, DrawnEvent, DrillEvent, ExportedEvent, ExportingEvent, FileSavingEvent, HoverChangedEvent, IncidentOccurredEvent, InitializedEvent, NodesInitializedEvent, NodesRenderingEvent, OptionChangedEvent, SelectionChangedEvent, TreeMapColorizerType, TreeMapLayoutAlgorithm, TreeMapLayoutDirection } from 'devextreme/viz/tree_map'; import DxTreeMap from 'devextreme/viz/tree_map'; diff --git a/packages/devextreme-angular/src/ui/vector-map/index.ts b/packages/devextreme-angular/src/ui/vector-map/index.ts index 2c53d5871a45..90049b39d772 100644 --- a/packages/devextreme-angular/src/ui/vector-map/index.ts +++ b/packages/devextreme-angular/src/ui/vector-map/index.ts @@ -25,11 +25,10 @@ import { import DevExpress from 'devextreme/bundles/dx.all'; import { ExportFormat, HorizontalAlignment, Orientation, Position, SingleMultipleOrNone, VerticalEdge } from 'devextreme/common'; -import { DashStyle, Palette, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; +import { DashStyle, Font, Palette, TextOverflow, Theme, WordWrap } from 'devextreme/common/charts'; import { UserDefinedElement } from 'devextreme/core/element'; import { Store } from 'devextreme/data'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; -import { Font } from 'devextreme/viz/core/base_widget'; import { CenterChangedEvent, ClickEvent, DisposingEvent, DrawnEvent, dxVectorMapCommonAnnotationConfig, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, OptionChangedEvent, SelectionChangedEvent, TooltipHiddenEvent, TooltipShownEvent, VectorMapLayerType, VectorMapMarkerShape, VectorMapMarkerType, ZoomFactorChangedEvent } from 'devextreme/viz/vector_map'; import { VectorMapProjection } from 'devextreme/viz/vector_map/projection'; diff --git a/packages/devextreme-react/src/bar-gauge.ts b/packages/devextreme-react/src/bar-gauge.ts index a1941d83400b..37184a15d870 100644 --- a/packages/devextreme-react/src/bar-gauge.ts +++ b/packages/devextreme-react/src/bar-gauge.ts @@ -7,9 +7,9 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent, BarGaugeBarInfo, BarGaugeLegendItem } from "devextreme/viz/bar_gauge"; +import type { Font as ChartsFont } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -181,7 +181,7 @@ class Animation extends NestedOption { // owners: // BarGauge type IBarGaugeTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -191,7 +191,7 @@ type IBarGaugeTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -215,7 +215,7 @@ class BarGaugeTitle extends NestedOption { // owners: // BarGaugeTitle type IBarGaugeTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -323,7 +323,7 @@ type ILabelProps = React.PropsWithChildren<{ connectorColor?: string; connectorWidth?: number; customizeText?: ((barValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indent?: number; visible?: boolean; @@ -353,7 +353,7 @@ type ILegendProps = React.PropsWithChildren<{ customizeHint?: ((arg: { item: BarGaugeBarInfo, text: string }) => string); customizeItems?: ((items: Array) => Array); customizeText?: ((arg: { item: BarGaugeBarInfo, text: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; itemsAlignment?: "center" | "left" | "right"; itemTextFormat?: LocalizationTypes.Format; @@ -372,7 +372,7 @@ type ILegendProps = React.PropsWithChildren<{ rowCount?: number; rowItemSpacing?: number; title?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -382,7 +382,7 @@ type ILegendProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -431,7 +431,7 @@ class LegendBorder extends NestedOption { // owners: // Legend type ILegendTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -441,7 +441,7 @@ type ILegendTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -461,7 +461,7 @@ class LegendTitle extends NestedOption { // owners: // LegendTitle type ILegendTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }> @@ -476,7 +476,7 @@ class LegendTitleSubtitle extends NestedOption { // BarGauge type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -534,7 +534,7 @@ class Size extends NestedOption { // LegendTitle // BarGaugeTitle type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -548,7 +548,7 @@ class Subtitle extends NestedOption { // Legend // BarGauge type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | number | { bottom?: number; @@ -558,7 +558,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -590,7 +590,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((scaleValue: { index: number, value: number, valueText: string }) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; interactive?: boolean; opacity?: number; diff --git a/packages/devextreme-react/src/bullet.ts b/packages/devextreme-react/src/bullet.ts index 8f40b5296fe1..13c59e886f20 100644 --- a/packages/devextreme-react/src/bullet.ts +++ b/packages/devextreme-react/src/bullet.ts @@ -8,8 +8,8 @@ import NestedOption from "./core/nested-option"; import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent } from "devextreme/viz/bullet"; import type { template } from "devextreme/core/templates/template"; +import type { Font as ChartsFont } from "devextreme/common/charts"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -185,7 +185,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((pointsInfo: any) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; interactive?: boolean; opacity?: number; diff --git a/packages/devextreme-react/src/chart.ts b/packages/devextreme-react/src/chart.ts index 81f81acd051b..01fdc214ce6f 100644 --- a/packages/devextreme-react/src/chart.ts +++ b/packages/devextreme-react/src/chart.ts @@ -7,13 +7,12 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { ArgumentAxisClickEvent, DisposingEvent, DoneEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LegendClickEvent, PointClickEvent, SeriesClickEvent, TooltipHiddenEvent, TooltipShownEvent, ZoomEndEvent, ZoomStartEvent, chartPointAggregationInfoObject, chartSeriesObject, dxChartAnnotationConfig, chartPointObject } from "devextreme/viz/chart"; +import type { Font as ChartsFont, ScaleBreak, ChartsColor } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type { ScaleBreak, ChartsColor } from "devextreme/common/charts"; import type { BaseChartLegendItem } from "devextreme/viz/chart_components/base_chart"; import type { ChartSeries } from "devextreme/viz/common"; import type * as CommonChartTypes from "devextreme/common/charts"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -315,7 +314,7 @@ type IAnnotationProps = React.PropsWithChildren<{ customizeTooltip?: ((annotation: dxChartAnnotationConfig | any) => Record); data?: any; description?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; height?: number; image?: Record | string | { height?: number; @@ -441,7 +440,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ displayBehindSeries?: boolean; extendAxis?: boolean; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; text?: string; @@ -457,7 +456,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; verticalAlignment?: "bottom" | "center" | "top"; @@ -485,7 +484,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ customizeHint?: ((argument: { value: any | number | string, valueText: string }) => string); customizeText?: ((argument: { value: any | number | string, valueText: string }) => string); displayMode?: "rotate" | "stagger" | "standard"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indentFromAxis?: number; overlappingBehavior?: "rotate" | "stagger" | "none" | "hide"; @@ -547,7 +546,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ color?: string; endValue?: any | number | string; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; text?: string; verticalAlignment?: "bottom" | "center" | "top"; @@ -558,7 +557,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ }[]; stripStyle?: Record | { label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; verticalAlignment?: "bottom" | "center" | "top"; }; @@ -586,7 +585,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ }; title?: Record | string | { alignment?: "center" | "left" | "right"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; margin?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -659,7 +658,7 @@ type IAxisConstantLineStyleProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; verticalAlignment?: "bottom" | "center" | "top"; @@ -677,7 +676,7 @@ class AxisConstantLineStyle extends NestedOption { // AxisConstantLineStyle // ConstantLineStyle type IAxisConstantLineStyleLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; verticalAlignment?: "bottom" | "center" | "top"; @@ -695,7 +694,7 @@ type IAxisLabelProps = React.PropsWithChildren<{ customizeHint?: ((argument: { value: any | number | string, valueText: string }) => string); customizeText?: ((argument: { value: any | number | string, valueText: string }) => string); displayMode?: "rotate" | "stagger" | "standard"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indentFromAxis?: number; overlappingBehavior?: "rotate" | "stagger" | "none" | "hide"; @@ -725,7 +724,7 @@ class AxisLabel extends NestedOption { // ValueAxis type IAxisTitleProps = React.PropsWithChildren<{ alignment?: "center" | "left" | "right"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; margin?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -799,7 +798,7 @@ class BreakStyle extends NestedOption { // owners: // Chart type IChartTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -809,7 +808,7 @@ type IChartTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -833,7 +832,7 @@ class ChartTitle extends NestedOption { // owners: // ChartTitle type IChartTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -881,7 +880,7 @@ type ICommonAnnotationSettingsProps = React.PropsWithChildren<{ customizeTooltip?: ((annotation: dxChartAnnotationConfig | any) => Record); data?: any; description?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; height?: number; image?: Record | string | { height?: number; @@ -949,7 +948,7 @@ type ICommonAxisSettingsProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; position?: "inside" | "outside"; visible?: boolean; }; @@ -969,7 +968,7 @@ type ICommonAxisSettingsProps = React.PropsWithChildren<{ label?: Record | { alignment?: "center" | "left" | "right"; displayMode?: "rotate" | "stagger" | "standard"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; indentFromAxis?: number; overlappingBehavior?: "rotate" | "stagger" | "none" | "hide"; position?: "inside" | "outside" | "bottom" | "left" | "right" | "top"; @@ -1000,7 +999,7 @@ type ICommonAxisSettingsProps = React.PropsWithChildren<{ placeholderSize?: number; stripStyle?: Record | { label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; verticalAlignment?: "bottom" | "center" | "top"; }; @@ -1017,7 +1016,7 @@ type ICommonAxisSettingsProps = React.PropsWithChildren<{ }; title?: Record | { alignment?: "center" | "left" | "right"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; margin?: number; textOverflow?: "ellipsis" | "hide" | "none"; wordWrap?: "normal" | "breakWord" | "none"; @@ -1044,7 +1043,7 @@ type ICommonAxisSettingsConstantLineStyleProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; position?: "inside" | "outside"; visible?: boolean; }; @@ -1063,7 +1062,7 @@ class CommonAxisSettingsConstantLineStyle extends NestedOption @@ -1076,7 +1075,7 @@ class CommonAxisSettingsConstantLineStyleLabel extends NestedOption string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; horizontalOffset?: number; position?: "inside" | "outside"; @@ -1396,7 +1395,7 @@ type ICommonSeriesSettingsLabelProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; horizontalOffset?: number; position?: "inside" | "outside"; @@ -1467,7 +1466,7 @@ type IConstantLineProps = React.PropsWithChildren<{ displayBehindSeries?: boolean; extendAxis?: boolean; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; text?: string; @@ -1488,7 +1487,7 @@ class ConstantLine extends NestedOption { // ConstantLine // ConstantLine type IConstantLineLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; text?: string; @@ -1507,7 +1506,7 @@ type IConstantLineStyleProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; verticalAlignment?: "bottom" | "center" | "top"; @@ -1533,7 +1532,7 @@ type ICrosshairProps = React.PropsWithChildren<{ label?: Record | { backgroundColor?: string; customizeText?: ((info: { point: chartPointObject, value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; visible?: boolean; }; @@ -1544,7 +1543,7 @@ type ICrosshairProps = React.PropsWithChildren<{ label?: Record | { backgroundColor?: string; customizeText?: ((info: { point: chartPointObject, value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; visible?: boolean; }; @@ -1555,7 +1554,7 @@ type ICrosshairProps = React.PropsWithChildren<{ label?: Record | { backgroundColor?: string; customizeText?: ((info: { point: chartPointObject, value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; visible?: boolean; }; @@ -1702,7 +1701,7 @@ type IHorizontalLineProps = React.PropsWithChildren<{ label?: Record | { backgroundColor?: string; customizeText?: ((info: { point: chartPointObject, value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; visible?: boolean; }; @@ -1725,7 +1724,7 @@ class HorizontalLine extends NestedOption { type IHorizontalLineLabelProps = React.PropsWithChildren<{ backgroundColor?: string; customizeText?: ((info: { point: chartPointObject, value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; visible?: boolean; }> @@ -1797,7 +1796,7 @@ class Image extends NestedOption { // Crosshair // VerticalLine type ILabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside" | "bottom" | "left" | "right" | "top"; verticalAlignment?: "bottom" | "center" | "top"; @@ -1863,7 +1862,7 @@ type ILegendProps = React.PropsWithChildren<{ customizeHint?: ((seriesInfo: { seriesColor: string, seriesIndex: number, seriesName: any }) => string); customizeItems?: ((items: Array) => Array); customizeText?: ((seriesInfo: { seriesColor: string, seriesIndex: number, seriesName: any }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; hoverMode?: "excludePoints" | "includePoints" | "none"; itemsAlignment?: "center" | "left" | "right"; @@ -1883,7 +1882,7 @@ type ILegendProps = React.PropsWithChildren<{ rowCount?: number; rowItemSpacing?: number; title?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -1893,7 +1892,7 @@ type ILegendProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -1927,7 +1926,7 @@ class Legend extends NestedOption { // owners: // Legend type ILegendTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -1937,7 +1936,7 @@ type ILegendTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -1957,7 +1956,7 @@ class LegendTitle extends NestedOption { // owners: // LegendTitle type ILegendTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }> @@ -1990,7 +1989,7 @@ class Length extends NestedOption { type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -2375,7 +2374,7 @@ type ISeriesProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; horizontalOffset?: number; position?: "inside" | "outside"; @@ -2543,7 +2542,7 @@ type IStripProps = React.PropsWithChildren<{ color?: string; endValue?: any | number | string; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; text?: string; verticalAlignment?: "bottom" | "center" | "top"; @@ -2561,7 +2560,7 @@ class Strip extends NestedOption { // Strip // Strip type IStripLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; text?: string; verticalAlignment?: "bottom" | "center" | "top"; @@ -2574,7 +2573,7 @@ class StripLabel extends NestedOption { // ArgumentAxis type IStripStyleProps = React.PropsWithChildren<{ label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; verticalAlignment?: "bottom" | "center" | "top"; }; @@ -2592,7 +2591,7 @@ class StripStyle extends NestedOption { // owners: // StripStyle type IStripStyleLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; verticalAlignment?: "bottom" | "center" | "top"; }> @@ -2604,7 +2603,7 @@ class StripStyleLabel extends NestedOption { // LegendTitle // ChartTitle type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -2654,7 +2653,7 @@ class TickInterval extends NestedOption { // Chart type ITitleProps = React.PropsWithChildren<{ alignment?: "center" | "left" | "right"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; margin?: number | Record | { bottom?: number; left?: number; @@ -2667,7 +2666,7 @@ type ITitleProps = React.PropsWithChildren<{ horizontalAlignment?: "center" | "left" | "right"; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -2697,7 +2696,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((pointInfo: any) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; interactive?: boolean; location?: "center" | "edge"; @@ -2782,7 +2781,7 @@ type IValueAxisProps = React.PropsWithChildren<{ displayBehindSeries?: boolean; extendAxis?: boolean; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; text?: string; @@ -2798,7 +2797,7 @@ type IValueAxisProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; position?: "inside" | "outside"; verticalAlignment?: "bottom" | "center" | "top"; @@ -2823,7 +2822,7 @@ type IValueAxisProps = React.PropsWithChildren<{ customizeHint?: ((axisValue: { value: any | number | string, valueText: string }) => string); customizeText?: ((axisValue: { value: any | number | string, valueText: string }) => string); displayMode?: "rotate" | "stagger" | "standard"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indentFromAxis?: number; overlappingBehavior?: "rotate" | "stagger" | "none" | "hide"; @@ -2889,7 +2888,7 @@ type IValueAxisProps = React.PropsWithChildren<{ color?: string; endValue?: any | number | string; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; text?: string; verticalAlignment?: "bottom" | "center" | "top"; @@ -2900,7 +2899,7 @@ type IValueAxisProps = React.PropsWithChildren<{ }[]; stripStyle?: Record | { label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; verticalAlignment?: "bottom" | "center" | "top"; }; @@ -2929,7 +2928,7 @@ type IValueAxisProps = React.PropsWithChildren<{ }; title?: Record | string | { alignment?: "center" | "left" | "right"; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; margin?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -2998,7 +2997,7 @@ type IVerticalLineProps = React.PropsWithChildren<{ label?: Record | { backgroundColor?: string; customizeText?: ((info: { point: chartPointObject, value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; visible?: boolean; }; diff --git a/packages/devextreme-react/src/circular-gauge.ts b/packages/devextreme-react/src/circular-gauge.ts index a34585c6d820..88f3591722e9 100644 --- a/packages/devextreme-react/src/circular-gauge.ts +++ b/packages/devextreme-react/src/circular-gauge.ts @@ -7,10 +7,9 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent } from "devextreme/viz/circular_gauge"; -import type { ChartsColor } from "devextreme/common/charts"; +import type { Font as ChartsFont, ChartsColor } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -243,7 +242,7 @@ class Geometry extends NestedOption { // Scale type ILabelProps = React.PropsWithChildren<{ customizeText?: ((scaleValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; hideFirstOrLast?: "first" | "last"; indentFromTick?: number; @@ -263,7 +262,7 @@ class Label extends NestedOption { // CircularGauge type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -352,7 +351,7 @@ type IScaleProps = React.PropsWithChildren<{ endValue?: number; label?: Record | { customizeText?: ((scaleValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; hideFirstOrLast?: "first" | "last"; indentFromTick?: number; @@ -415,7 +414,7 @@ class Size extends NestedOption { // owners: // Title type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -448,7 +447,7 @@ type ISubvalueIndicatorProps = React.PropsWithChildren<{ spindleSize?: number; text?: Record | { customizeText?: ((indicatedValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indent?: number; }; @@ -468,7 +467,7 @@ class SubvalueIndicator extends NestedOption { // SubvalueIndicator type ITextProps = React.PropsWithChildren<{ customizeText?: ((indicatedValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indent?: number; }> @@ -496,7 +495,7 @@ class Tick extends NestedOption { // owners: // CircularGauge type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -506,7 +505,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -543,7 +542,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((scaleValue: { value: number, valueText: string }) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; interactive?: boolean; opacity?: number; @@ -597,7 +596,7 @@ type IValueIndicatorProps = React.PropsWithChildren<{ spindleSize?: number; text?: Record | { customizeText?: ((indicatedValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indent?: number; }; diff --git a/packages/devextreme-react/src/common/charts.ts b/packages/devextreme-react/src/common/charts.ts index 71ba0bc6d747..6278bb0cf734 100644 --- a/packages/devextreme-react/src/common/charts.ts +++ b/packages/devextreme-react/src/common/charts.ts @@ -9,6 +9,7 @@ export { ChartsLabelOverlap, DashStyle, DiscreteAxisDivisionMode, + Font, GradientColor, HatchDirection, LabelOverlap, diff --git a/packages/devextreme-react/src/funnel.ts b/packages/devextreme-react/src/funnel.ts index cd55e205da89..f863367b04a7 100644 --- a/packages/devextreme-react/src/funnel.ts +++ b/packages/devextreme-react/src/funnel.ts @@ -7,9 +7,9 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, ItemClickEvent, LegendClickEvent, dxFunnelItem, FunnelLegendItem } from "devextreme/viz/funnel"; +import type { Font as ChartsFont } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -266,7 +266,7 @@ class Format extends NestedOption { // owners: // Funnel type IFunnelTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -276,7 +276,7 @@ type IFunnelTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -300,7 +300,7 @@ class FunnelTitle extends NestedOption { // owners: // FunnelTitle type IFunnelTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -425,7 +425,7 @@ type ILabelProps = React.PropsWithChildren<{ width?: number; }; customizeText?: ((itemInfo: { item: dxFunnelItem, percent: number, percentText: string, value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; horizontalAlignment?: "left" | "right"; horizontalOffset?: number; @@ -475,7 +475,7 @@ type ILegendProps = React.PropsWithChildren<{ customizeHint?: ((itemInfo: { item: dxFunnelItem, text: string }) => string); customizeItems?: ((items: Array) => Array); customizeText?: ((itemInfo: { item: dxFunnelItem, text: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; itemsAlignment?: "center" | "left" | "right"; itemTextPosition?: "bottom" | "left" | "right" | "top"; @@ -493,7 +493,7 @@ type ILegendProps = React.PropsWithChildren<{ rowCount?: number; rowItemSpacing?: number; title?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -503,7 +503,7 @@ type ILegendProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -551,7 +551,7 @@ class LegendBorder extends NestedOption { // owners: // Legend type ILegendTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -561,7 +561,7 @@ type ILegendTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -581,7 +581,7 @@ class LegendTitle extends NestedOption { // owners: // LegendTitle type ILegendTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }> @@ -597,7 +597,7 @@ class LegendTitleSubtitle extends NestedOption { type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -679,7 +679,7 @@ class Size extends NestedOption { // LegendTitle // FunnelTitle type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -693,7 +693,7 @@ class Subtitle extends NestedOption { // Legend // Funnel type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | number | { bottom?: number; @@ -703,7 +703,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -735,7 +735,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((info: { item: dxFunnelItem, percent: number, percentText: string, value: number, valueText: string }) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; opacity?: number; paddingLeftRight?: number; diff --git a/packages/devextreme-react/src/linear-gauge.ts b/packages/devextreme-react/src/linear-gauge.ts index d6f7de856680..bd8d71c88eff 100644 --- a/packages/devextreme-react/src/linear-gauge.ts +++ b/packages/devextreme-react/src/linear-gauge.ts @@ -7,10 +7,9 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent } from "devextreme/viz/linear_gauge"; -import type { ChartsColor } from "devextreme/common/charts"; +import type { Font as ChartsFont, ChartsColor } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -232,7 +231,7 @@ class Geometry extends NestedOption { // Scale type ILabelProps = React.PropsWithChildren<{ customizeText?: ((scaleValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indentFromTick?: number; overlappingBehavior?: "hide" | "none"; @@ -251,7 +250,7 @@ class Label extends NestedOption { // LinearGauge type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -346,7 +345,7 @@ type IScaleProps = React.PropsWithChildren<{ horizontalOrientation?: "center" | "left" | "right"; label?: Record | { customizeText?: ((scaleValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indentFromTick?: number; overlappingBehavior?: "hide" | "none"; @@ -408,7 +407,7 @@ class Size extends NestedOption { // owners: // Title type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -441,7 +440,7 @@ type ISubvalueIndicatorProps = React.PropsWithChildren<{ spindleSize?: number; text?: Record | { customizeText?: ((indicatedValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indent?: number; }; @@ -461,7 +460,7 @@ class SubvalueIndicator extends NestedOption { // SubvalueIndicator type ITextProps = React.PropsWithChildren<{ customizeText?: ((indicatedValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indent?: number; }> @@ -489,7 +488,7 @@ class Tick extends NestedOption { // owners: // LinearGauge type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -499,7 +498,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -536,7 +535,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((scaleValue: { value: number, valueText: string }) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; interactive?: boolean; opacity?: number; @@ -590,7 +589,7 @@ type IValueIndicatorProps = React.PropsWithChildren<{ spindleSize?: number; text?: Record | { customizeText?: ((indicatedValue: { value: number, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indent?: number; }; diff --git a/packages/devextreme-react/src/pie-chart.ts b/packages/devextreme-react/src/pie-chart.ts index baaceef33bb3..db3671623cfc 100644 --- a/packages/devextreme-react/src/pie-chart.ts +++ b/packages/devextreme-react/src/pie-chart.ts @@ -7,10 +7,9 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { DisposingEvent, DoneEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LegendClickEvent, PointClickEvent, TooltipHiddenEvent, TooltipShownEvent, dxPieChartAnnotationConfig, dxPieChartCommonAnnotationConfig, PieChartLegendItem, PieChartSeries } from "devextreme/viz/pie_chart"; +import type { Font as ChartsFont, ChartsColor } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type { ChartsColor } from "devextreme/common/charts"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -249,7 +248,7 @@ type IAnnotationProps = React.PropsWithChildren<{ customizeTooltip?: ((annotation: dxPieChartAnnotationConfig | any) => Record); data?: any; description?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; height?: number; image?: Record | string | { height?: number; @@ -392,7 +391,7 @@ type ICommonAnnotationSettingsProps = React.PropsWithChildren<{ customizeTooltip?: ((annotation: dxPieChartAnnotationConfig | any) => Record); data?: any; description?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; height?: number; image?: Record | string | { height?: number; @@ -490,7 +489,7 @@ type ICommonSeriesSettingsProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; position?: "columns" | "inside" | "outside"; radialOffset?: number; @@ -672,7 +671,7 @@ type ILabelProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; position?: "columns" | "inside" | "outside"; radialOffset?: number; @@ -710,7 +709,7 @@ type ILegendProps = React.PropsWithChildren<{ customizeHint?: ((pointInfo: { pointColor: string, pointIndex: number, pointName: any }) => string); customizeItems?: ((items: Array) => Array); customizeText?: ((pointInfo: { pointColor: string, pointIndex: number, pointName: any }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; hoverMode?: "none" | "allArgumentPoints"; itemsAlignment?: "center" | "left" | "right"; @@ -729,7 +728,7 @@ type ILegendProps = React.PropsWithChildren<{ rowCount?: number; rowItemSpacing?: number; title?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -739,7 +738,7 @@ type ILegendProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -773,7 +772,7 @@ class Legend extends NestedOption { // owners: // Legend type ILegendTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -783,7 +782,7 @@ type ILegendTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -803,7 +802,7 @@ class LegendTitle extends NestedOption { // owners: // LegendTitle type ILegendTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }> @@ -819,7 +818,7 @@ class LegendTitleSubtitle extends NestedOption { type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -853,7 +852,7 @@ class Margin extends NestedOption { // owners: // PieChart type IPieChartTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -863,7 +862,7 @@ type IPieChartTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -887,7 +886,7 @@ class PieChartTitle extends NestedOption { // owners: // PieChartTitle type IPieChartTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -973,7 +972,7 @@ type ISeriesProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; position?: "columns" | "inside" | "outside"; radialOffset?: number; @@ -1082,7 +1081,7 @@ class SmallValuesGrouping extends NestedOption { // LegendTitle // PieChartTitle type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -1096,7 +1095,7 @@ class Subtitle extends NestedOption { // Legend // PieChart type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | number | { bottom?: number; @@ -1106,7 +1105,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -1139,7 +1138,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((pointInfo: any) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; interactive?: boolean; opacity?: number; diff --git a/packages/devextreme-react/src/polar-chart.ts b/packages/devextreme-react/src/polar-chart.ts index ff0aedbd0deb..3f274c68e927 100644 --- a/packages/devextreme-react/src/polar-chart.ts +++ b/packages/devextreme-react/src/polar-chart.ts @@ -7,12 +7,11 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { DisposingEvent, DoneEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LegendClickEvent, PointClickEvent, SeriesClickEvent, TooltipHiddenEvent, TooltipShownEvent, ZoomEndEvent, ZoomStartEvent, dxPolarChartAnnotationConfig, dxPolarChartCommonAnnotationConfig, PolarChartSeries } from "devextreme/viz/polar_chart"; +import type { Font as ChartsFont, ChartsColor } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type { ChartsColor } from "devextreme/common/charts"; import type { BaseChartLegendItem } from "devextreme/viz/chart_components/base_chart"; import type * as CommonChartTypes from "devextreme/common/charts"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -255,7 +254,7 @@ type IAnnotationProps = React.PropsWithChildren<{ customizeTooltip?: ((annotation: dxPolarChartAnnotationConfig | any) => Record); data?: any; description?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; height?: number; image?: Record | string | { height?: number; @@ -347,7 +346,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ displayBehindSeries?: boolean; extendAxis?: boolean; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; visible?: boolean; }; @@ -358,7 +357,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; visible?: boolean; }; width?: number; @@ -377,7 +376,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{ label?: Record | { customizeHint?: ((argument: { value: any | number | string, valueText: string }) => string); customizeText?: ((argument: { value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indentFromAxis?: number; overlappingBehavior?: "hide" | "none"; @@ -419,14 +418,14 @@ type IArgumentAxisProps = React.PropsWithChildren<{ color?: string; endValue?: any | number | string; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; }; startValue?: any | number | string; }[]; stripStyle?: Record | { label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; }; }; tick?: Record | { @@ -521,7 +520,7 @@ class ArgumentFormat extends NestedOption { type IAxisLabelProps = React.PropsWithChildren<{ customizeHint?: ((argument: { value: any | number | string, valueText: string }) => string); customizeText?: ((argument: { value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indentFromAxis?: number; overlappingBehavior?: "hide" | "none"; @@ -589,7 +588,7 @@ type ICommonAnnotationSettingsProps = React.PropsWithChildren<{ customizeTooltip?: ((annotation: dxPolarChartAnnotationConfig | any) => Record); data?: any; description?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; height?: number; image?: Record | string | { height?: number; @@ -652,7 +651,7 @@ type ICommonAxisSettingsProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; visible?: boolean; }; width?: number; @@ -667,7 +666,7 @@ type ICommonAxisSettingsProps = React.PropsWithChildren<{ }; inverted?: boolean; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; indentFromAxis?: number; overlappingBehavior?: "hide" | "none"; visible?: boolean; @@ -688,7 +687,7 @@ type ICommonAxisSettingsProps = React.PropsWithChildren<{ opacity?: number; stripStyle?: Record | { label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; }; }; tick?: Record | { @@ -716,7 +715,7 @@ class CommonAxisSettings extends NestedOption { // owners: // CommonAxisSettings type ICommonAxisSettingsLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; indentFromAxis?: number; overlappingBehavior?: "hide" | "none"; visible?: boolean; @@ -805,7 +804,7 @@ type ICommonSeriesSettingsProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; position?: "inside" | "outside"; rotationAngle?: number; @@ -957,7 +956,7 @@ type ICommonSeriesSettingsLabelProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; position?: "inside" | "outside"; rotationAngle?: number; @@ -1026,7 +1025,7 @@ type IConstantLineProps = React.PropsWithChildren<{ displayBehindSeries?: boolean; extendAxis?: boolean; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; visible?: boolean; }; @@ -1042,7 +1041,7 @@ class ConstantLine extends NestedOption { // ConstantLine // ConstantLine type IConstantLineLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; visible?: boolean; }> @@ -1056,7 +1055,7 @@ type IConstantLineStyleProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; visible?: boolean; }; width?: number; @@ -1072,7 +1071,7 @@ class ConstantLineStyle extends NestedOption { // owners: // ConstantLineStyle type IConstantLineStyleLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; visible?: boolean; }> class ConstantLineStyleLabel extends NestedOption { @@ -1221,7 +1220,7 @@ class Image extends NestedOption { // CommonAxisSettings // CommonSeriesSettings type ILabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; visible?: boolean; customizeHint?: ((argument: { value: any | number | string, valueText: string }) => string); @@ -1268,7 +1267,7 @@ type ILegendProps = React.PropsWithChildren<{ customizeHint?: ((seriesInfo: { seriesColor: string, seriesIndex: number, seriesName: any }) => string); customizeItems?: ((items: Array) => Array); customizeText?: ((seriesInfo: { seriesColor: string, seriesIndex: number, seriesName: any }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; hoverMode?: "excludePoints" | "includePoints" | "none"; itemsAlignment?: "center" | "left" | "right"; @@ -1287,7 +1286,7 @@ type ILegendProps = React.PropsWithChildren<{ rowCount?: number; rowItemSpacing?: number; title?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -1297,7 +1296,7 @@ type ILegendProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -1331,7 +1330,7 @@ class Legend extends NestedOption { // owners: // Legend type ILegendTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -1341,7 +1340,7 @@ type ILegendTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -1361,7 +1360,7 @@ class LegendTitle extends NestedOption { // owners: // LegendTitle type ILegendTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }> @@ -1394,7 +1393,7 @@ class Length extends NestedOption { type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -1595,7 +1594,7 @@ class PointSelectionStyle extends NestedOption { // owners: // PolarChart type IPolarChartTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -1605,7 +1604,7 @@ type IPolarChartTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -1629,7 +1628,7 @@ class PolarChartTitle extends NestedOption { // owners: // PolarChartTitle type IPolarChartTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -1719,7 +1718,7 @@ type ISeriesProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; position?: "inside" | "outside"; rotationAngle?: number; @@ -1866,7 +1865,7 @@ type IStripProps = React.PropsWithChildren<{ color?: string; endValue?: any | number | string; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; }; startValue?: any | number | string; @@ -1880,7 +1879,7 @@ class Strip extends NestedOption { // Strip // Strip type IStripLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; }> class StripLabel extends NestedOption { @@ -1891,7 +1890,7 @@ class StripLabel extends NestedOption { // ArgumentAxis type IStripStyleProps = React.PropsWithChildren<{ label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; }; }> class StripStyle extends NestedOption { @@ -1905,7 +1904,7 @@ class StripStyle extends NestedOption { // owners: // StripStyle type IStripStyleLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; }> class StripStyleLabel extends NestedOption { public static OptionName = "label"; @@ -1915,7 +1914,7 @@ class StripStyleLabel extends NestedOption { // LegendTitle // PolarChartTitle type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -1963,7 +1962,7 @@ class TickInterval extends NestedOption { // Legend // PolarChart type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | number | { bottom?: number; @@ -1973,7 +1972,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -2006,7 +2005,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((pointInfo: any) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; interactive?: boolean; opacity?: number; @@ -2069,7 +2068,7 @@ type IValueAxisProps = React.PropsWithChildren<{ displayBehindSeries?: boolean; extendAxis?: boolean; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; visible?: boolean; }; @@ -2080,7 +2079,7 @@ type IValueAxisProps = React.PropsWithChildren<{ color?: string; dashStyle?: "dash" | "dot" | "longDash" | "solid"; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; visible?: boolean; }; width?: number; @@ -2097,7 +2096,7 @@ type IValueAxisProps = React.PropsWithChildren<{ label?: Record | { customizeHint?: ((axisValue: { value: any | number | string, valueText: string }) => string); customizeText?: ((axisValue: { value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; indentFromAxis?: number; overlappingBehavior?: "hide" | "none"; @@ -2149,14 +2148,14 @@ type IValueAxisProps = React.PropsWithChildren<{ color?: string; endValue?: any | number | string; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; text?: string; }; startValue?: any | number | string; }[]; stripStyle?: Record | { label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; }; }; tick?: Record | { diff --git a/packages/devextreme-react/src/range-selector.ts b/packages/devextreme-react/src/range-selector.ts index 3bc9a769b2ea..ceaf7521fa57 100644 --- a/packages/devextreme-react/src/range-selector.ts +++ b/packages/devextreme-react/src/range-selector.ts @@ -9,11 +9,10 @@ import NestedOption from "./core/nested-option"; import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, ValueChangedEvent } from "devextreme/viz/range_selector"; import type { chartPointAggregationInfoObject, chartSeriesObject, dxChartCommonSeriesSettings } from "devextreme/viz/chart"; import type { ChartSeries } from "devextreme/viz/common"; -import type { ChartsColor, ScaleBreak } from "devextreme/common/charts"; +import type { ChartsColor, Font as ChartsFont, ScaleBreak } from "devextreme/common/charts"; import type * as CommonChartTypes from "devextreme/common/charts"; import type * as LocalizationTypes from "devextreme/localization"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; type ReplaceFieldTypes = { [P in keyof TSource]: P extends keyof TReplacement ? TReplacement[P] : TSource[P]; @@ -391,7 +390,7 @@ type ICommonSeriesSettingsProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; horizontalOffset?: number; position?: "inside" | "outside"; @@ -578,7 +577,7 @@ type ICommonSeriesSettingsLabelProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; horizontalOffset?: number; position?: "inside" | "outside"; @@ -803,7 +802,7 @@ type ILabelProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; horizontalOffset?: number; position?: "inside" | "outside"; @@ -840,7 +839,7 @@ class Length extends NestedOption { type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -1149,7 +1148,7 @@ type IScaleProps = React.PropsWithChildren<{ holidays?: Array | Array; label?: Record | { customizeText?: ((scaleValue: { value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; overlappingBehavior?: "hide" | "none"; topIndent?: number; @@ -1255,7 +1254,7 @@ class Scale extends NestedOption { // Scale type IScaleLabelProps = React.PropsWithChildren<{ customizeText?: ((scaleValue: { value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; overlappingBehavior?: "hide" | "none"; topIndent?: number; @@ -1357,7 +1356,7 @@ type ISeriesProps = React.PropsWithChildren<{ }; customizeText?: ((pointInfo: any) => string); displayFormat?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; horizontalOffset?: number; position?: "inside" | "outside"; @@ -1530,7 +1529,7 @@ class SliderHandle extends NestedOption { type ISliderMarkerProps = React.PropsWithChildren<{ color?: string; customizeText?: ((scaleValue: { value: any | number | string, valueText: string }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; invalidRangeColor?: string; paddingLeftRight?: number; @@ -1549,7 +1548,7 @@ class SliderMarker extends NestedOption { // owners: // Title type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -1593,7 +1592,7 @@ class TickInterval extends NestedOption { // owners: // RangeSelector type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -1603,7 +1602,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; diff --git a/packages/devextreme-react/src/sankey.ts b/packages/devextreme-react/src/sankey.ts index 18ff6083e212..fea1e7827bcc 100644 --- a/packages/devextreme-react/src/sankey.ts +++ b/packages/devextreme-react/src/sankey.ts @@ -7,9 +7,9 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LinkClickEvent, NodeClickEvent, dxSankeyNode } from "devextreme/viz/sankey"; +import type { Font as ChartsFont } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -275,7 +275,7 @@ type ILabelProps = React.PropsWithChildren<{ width?: number; }; customizeText?: ((itemInfo: dxSankeyNode) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalOffset?: number; overlappingBehavior?: "ellipsis" | "hide" | "none"; shadow?: Record | { @@ -340,7 +340,7 @@ class Link extends NestedOption { type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -448,7 +448,7 @@ class Size extends NestedOption { // owners: // Title type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -464,7 +464,7 @@ class Subtitle extends NestedOption { // owners: // Sankey type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -474,7 +474,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -511,7 +511,7 @@ type ITooltipProps = React.PropsWithChildren<{ customizeLinkTooltip?: ((info: { source: string, target: string, weight: number }) => Record); customizeNodeTooltip?: ((info: { label: string, title: string, weightIn: number, weightOut: number }) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; linkTooltipTemplate?: ((info: { source: string, target: string, weight: number }, element: any) => string | any) | template; nodeTooltipTemplate?: ((info: { label: string, weightIn: number, weightOut: number }, element: any) => string | any) | template; diff --git a/packages/devextreme-react/src/sparkline.ts b/packages/devextreme-react/src/sparkline.ts index 9ed7305322f0..9247acf1c009 100644 --- a/packages/devextreme-react/src/sparkline.ts +++ b/packages/devextreme-react/src/sparkline.ts @@ -8,8 +8,8 @@ import NestedOption from "./core/nested-option"; import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent } from "devextreme/viz/sparkline"; import type { template } from "devextreme/core/templates/template"; +import type { Font as ChartsFont } from "devextreme/common/charts"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -218,7 +218,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((pointsInfo: any) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; interactive?: boolean; opacity?: number; diff --git a/packages/devextreme-react/src/tree-map.ts b/packages/devextreme-react/src/tree-map.ts index 7b9d42e02969..dac5885bbdc5 100644 --- a/packages/devextreme-react/src/tree-map.ts +++ b/packages/devextreme-react/src/tree-map.ts @@ -7,9 +7,9 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { ClickEvent, DisposingEvent, DrawnEvent, DrillEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, NodesInitializedEvent, NodesRenderingEvent, dxTreeMapNode } from "devextreme/viz/tree_map"; +import type { Font as ChartsFont } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; import type * as LocalizationTypes from "devextreme/localization"; type ReplaceFieldTypes = { @@ -245,7 +245,7 @@ type IGroupProps = React.PropsWithChildren<{ color?: string; }; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; textOverflow?: "ellipsis" | "hide" | "none"; visible?: boolean; }; @@ -273,7 +273,7 @@ class Group extends NestedOption { // owners: // Group type IGroupLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; textOverflow?: "ellipsis" | "hide" | "none"; visible?: boolean; }> @@ -302,7 +302,7 @@ class HoverStyle extends NestedOption { // Group // Tile type ILabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; textOverflow?: "ellipsis" | "hide" | "none"; visible?: boolean; wordWrap?: "normal" | "breakWord" | "none"; @@ -316,7 +316,7 @@ class Label extends NestedOption { type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -384,7 +384,7 @@ class Size extends NestedOption { // owners: // Title type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -413,7 +413,7 @@ type ITileProps = React.PropsWithChildren<{ color?: string; }; label?: Record | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; textOverflow?: "ellipsis" | "hide" | "none"; visible?: boolean; wordWrap?: "normal" | "breakWord" | "none"; @@ -441,7 +441,7 @@ class Tile extends NestedOption { // owners: // Tile type ITileLabelProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; textOverflow?: "ellipsis" | "hide" | "none"; visible?: boolean; wordWrap?: "normal" | "breakWord" | "none"; @@ -456,7 +456,7 @@ class TileLabel extends NestedOption { // owners: // TreeMap type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -466,7 +466,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -503,7 +503,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((info: { node: dxTreeMapNode, value: number, valueText: string }) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; format?: LocalizationTypes.Format; opacity?: number; paddingLeftRight?: number; diff --git a/packages/devextreme-react/src/vector-map.ts b/packages/devextreme-react/src/vector-map.ts index c07568aecf8a..dfd401447394 100644 --- a/packages/devextreme-react/src/vector-map.ts +++ b/packages/devextreme-react/src/vector-map.ts @@ -7,14 +7,13 @@ import { Component as BaseComponent, IHtmlOptions } from "./core/component"; import NestedOption from "./core/nested-option"; import type { ClickEvent, DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent, dxVectorMapAnnotationConfig, MapLayerElement, VectorMapLegendItem } from "devextreme/viz/vector_map"; +import type { Font as ChartsFont } from "devextreme/common/charts"; import type { template } from "devextreme/core/templates/template"; import type { DataSourceOptions } from "devextreme/data/data_source"; import type { Store } from "devextreme/data/abstract_store"; import type DataSource from "devextreme/data/data_source"; -import type * as BaseWidgetTypes from "devextreme/viz/core/base_widget"; - type ReplaceFieldTypes = { [P in keyof TSource]: P extends keyof TReplacement ? TReplacement[P] : TSource[P]; } @@ -165,7 +164,7 @@ type IAnnotationProps = React.PropsWithChildren<{ customizeTooltip?: ((annotation: dxVectorMapAnnotationConfig | any) => Record); data?: any; description?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; height?: number; image?: Record | string | { height?: number; @@ -285,7 +284,7 @@ type ICommonAnnotationSettingsProps = React.PropsWithChildren<{ customizeTooltip?: ((annotation: dxVectorMapAnnotationConfig | any) => Record); data?: any; description?: string; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; height?: number; image?: Record | string | { height?: number; @@ -405,7 +404,7 @@ class Image extends NestedOption { type ILabelProps = React.PropsWithChildren<{ dataField?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; }> class Label extends NestedOption { public static OptionName = "label"; @@ -433,7 +432,7 @@ type ILayerProps = React.PropsWithChildren<{ label?: Record | { dataField?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; }; maxSize?: number; minSize?: number; @@ -476,7 +475,7 @@ type ILegendProps = React.PropsWithChildren<{ customizeHint?: ((itemInfo: { color: string, end: number, index: number, size: number, start: number }) => string); customizeItems?: ((items: Array) => Array); customizeText?: ((itemInfo: { color: string, end: number, index: number, size: number, start: number }) => string); - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; itemsAlignment?: "center" | "left" | "right"; itemTextPosition?: "bottom" | "left" | "right" | "top"; @@ -500,7 +499,7 @@ type ILegendProps = React.PropsWithChildren<{ layer?: string; }; title?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -510,7 +509,7 @@ type ILegendProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -546,7 +545,7 @@ class Legend extends NestedOption { // owners: // Legend type ILegendTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | { bottom?: number; @@ -556,7 +555,7 @@ type ILegendTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }; @@ -576,7 +575,7 @@ class LegendTitle extends NestedOption { // owners: // LegendTitle type ILegendTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; }> @@ -592,7 +591,7 @@ class LegendTitleSubtitle extends NestedOption { type ILoadingIndicatorProps = React.PropsWithChildren<{ backgroundColor?: string; enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; show?: boolean; text?: string; defaultShow?: boolean; @@ -671,7 +670,7 @@ class Source extends NestedOption { // LegendTitle // VectorMapTitle type ISubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -685,7 +684,7 @@ class Subtitle extends NestedOption { // Legend // VectorMap type ITitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: Record | number | { bottom?: number; @@ -695,7 +694,7 @@ type ITitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -727,7 +726,7 @@ type ITooltipProps = React.PropsWithChildren<{ cornerRadius?: number; customizeTooltip?: ((info: MapLayerElement) => Record); enabled?: boolean; - font?: BaseWidgetTypes.Font; + font?: ChartsFont; opacity?: number; paddingLeftRight?: number; paddingTopBottom?: number; @@ -775,7 +774,7 @@ class TooltipBorder extends NestedOption { // owners: // VectorMap type IVectorMapTitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; horizontalAlignment?: "center" | "left" | "right"; margin?: number | Record | { bottom?: number; @@ -785,7 +784,7 @@ type IVectorMapTitleProps = React.PropsWithChildren<{ }; placeholderSize?: number; subtitle?: Record | string | { - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; @@ -809,7 +808,7 @@ class VectorMapTitle extends NestedOption { // owners: // VectorMapTitle type IVectorMapTitleSubtitleProps = React.PropsWithChildren<{ - font?: BaseWidgetTypes.Font; + font?: ChartsFont; offset?: number; text?: string; textOverflow?: "ellipsis" | "hide" | "none"; diff --git a/packages/devextreme-vue/src/common/charts.ts b/packages/devextreme-vue/src/common/charts.ts index 71ba0bc6d747..6278bb0cf734 100644 --- a/packages/devextreme-vue/src/common/charts.ts +++ b/packages/devextreme-vue/src/common/charts.ts @@ -9,6 +9,7 @@ export { ChartsLabelOverlap, DashStyle, DiscreteAxisDivisionMode, + Font, GradientColor, HatchDirection, LabelOverlap, diff --git a/packages/devextreme/js/common/charts.d.ts b/packages/devextreme/js/common/charts.d.ts index 12ea17c6b038..3bd22ca1d197 100644 --- a/packages/devextreme/js/common/charts.d.ts +++ b/packages/devextreme/js/common/charts.d.ts @@ -1,8 +1,5 @@ import { HorizontalAlignment } from '../common'; import { Format } from '../localization'; -import { - Font, -} from '../viz/core/base_widget'; /** * @public @@ -341,6 +338,43 @@ export type GradientColor = { color: string; }; +/** + * @docid + * @namespace DevExpress.common.charts + * @public + */ +export type 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; +}; + /** * @namespace DevExpress.common.charts * @public diff --git a/packages/devextreme/js/viz/bar_gauge.d.ts b/packages/devextreme/js/viz/bar_gauge.d.ts index e3d931a74746..5c0158274143 100644 --- a/packages/devextreme/js/viz/bar_gauge.d.ts +++ b/packages/devextreme/js/viz/bar_gauge.d.ts @@ -26,7 +26,6 @@ import BaseWidget, { BaseWidgetLoadingIndicator, BaseWidgetOptions, BaseWidgetTooltip, - Font, FileSavingEventInfo, ExportInfo, IncidentInfo, @@ -37,6 +36,7 @@ import { Palette, PaletteExtensionMode, ShiftLabelOverlap, + Font, } from '../common/charts'; export { diff --git a/packages/devextreme/js/viz/chart.d.ts b/packages/devextreme/js/viz/chart.d.ts index 9e2ffd995c84..6c898a30c081 100644 --- a/packages/devextreme/js/viz/chart.d.ts +++ b/packages/devextreme/js/viz/chart.d.ts @@ -34,7 +34,6 @@ import { } from './common'; import { - Font, FileSavingEventInfo, ExportInfo, IncidentInfo, @@ -76,6 +75,7 @@ import { ChartsColor, SeriesPoint, SeriesLabel, + Font, } from '../common/charts'; /** diff --git a/packages/devextreme/js/viz/common.d.ts b/packages/devextreme/js/viz/common.d.ts index 4b5a51d16cca..05b59d8e63a7 100644 --- a/packages/devextreme/js/viz/common.d.ts +++ b/packages/devextreme/js/viz/common.d.ts @@ -2,10 +2,6 @@ import { dxChartSeriesTypesCommonSeries, } from './chart'; -import { - Font, -} from './core/base_widget'; - import { HorizontalAlignment, Orientation, @@ -17,6 +13,7 @@ import { DashStyle, LegendMarkerState, SeriesType as CommonSeriesType, + Font, } from '../common/charts'; import type * as Common from '../common/charts'; diff --git a/packages/devextreme/js/viz/core/base_widget.d.ts b/packages/devextreme/js/viz/core/base_widget.d.ts index 38bfc3db6117..51e17bd9c00d 100644 --- a/packages/devextreme/js/viz/core/base_widget.d.ts +++ b/packages/devextreme/js/viz/core/base_widget.d.ts @@ -32,6 +32,7 @@ import { TextOverflow, Theme, WordWrap, + Font as CommonFont, } from '../../common/charts'; /** @@ -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 @@ -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' @@ -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 @@ -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 @@ -656,44 +661,6 @@ export default class BaseWidget extends DOMComponent { 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 @@ -775,9 +742,10 @@ export interface BaseWidgetAnnotationConfig { /** * @docid * @default '#333333' &prop(color) + * @type Font * @public */ - font?: Font; + font?: CommonFont; /** * @docid * @default undefined @@ -915,3 +883,13 @@ export interface BaseWidgetAnnotationConfig { */ y?: number; } + +// #region deprecated in 22.2 + +/** + * @namespace DevExpress.viz + * @deprecated Use Font from common/charts instead + */ +export type Font = CommonFont; + +// #endregion diff --git a/packages/devextreme/js/viz/funnel.d.ts b/packages/devextreme/js/viz/funnel.d.ts index 7d95d66e1a34..d424b708adb3 100644 --- a/packages/devextreme/js/viz/funnel.d.ts +++ b/packages/devextreme/js/viz/funnel.d.ts @@ -28,7 +28,6 @@ import { import BaseWidget, { BaseWidgetOptions, BaseWidgetTooltip, - Font, FileSavingEventInfo, ExportInfo, IncidentInfo, @@ -48,6 +47,7 @@ import { ShiftLabelOverlap, TextOverflow, WordWrap, + Font, } from '../common/charts'; export { diff --git a/packages/devextreme/js/viz/gauges/base_gauge.d.ts b/packages/devextreme/js/viz/gauges/base_gauge.d.ts index 7310c9f344a0..fb222dde2462 100644 --- a/packages/devextreme/js/viz/gauges/base_gauge.d.ts +++ b/packages/devextreme/js/viz/gauges/base_gauge.d.ts @@ -19,7 +19,6 @@ import BaseWidget, { BaseWidgetLoadingIndicator, BaseWidgetOptions, BaseWidgetTooltip, - Font, } from '../core/base_widget'; import { @@ -33,6 +32,7 @@ import { PaletteExtensionMode, LabelOverlap, ChartsColor, + Font, } from '../../common/charts'; /** diff --git a/packages/devextreme/js/viz/pie_chart.d.ts b/packages/devextreme/js/viz/pie_chart.d.ts index cf94e01dea2f..0846c9581c62 100644 --- a/packages/devextreme/js/viz/pie_chart.d.ts +++ b/packages/devextreme/js/viz/pie_chart.d.ts @@ -37,7 +37,6 @@ import { } from './common'; import { - Font, BaseWidgetAnnotationConfig, FileSavingEventInfo, ExportInfo, @@ -54,6 +53,7 @@ import { TextOverflow, WordWrap, ChartsColor, + Font, } from '../common/charts'; export { diff --git a/packages/devextreme/js/viz/polar_chart.d.ts b/packages/devextreme/js/viz/polar_chart.d.ts index 2d7e576aa864..1e63968bb6db 100644 --- a/packages/devextreme/js/viz/polar_chart.d.ts +++ b/packages/devextreme/js/viz/polar_chart.d.ts @@ -38,7 +38,6 @@ import { } from '../core/templates/template'; import { - Font, FileSavingEventInfo, ExportInfo, IncidentInfo, @@ -68,6 +67,7 @@ import { VisualRange, ZoomPanAction, ChartsColor, + Font, } from '../common/charts'; /** diff --git a/packages/devextreme/js/viz/range_selector.d.ts b/packages/devextreme/js/viz/range_selector.d.ts index eda97586480a..94b84f47b93f 100644 --- a/packages/devextreme/js/viz/range_selector.d.ts +++ b/packages/devextreme/js/viz/range_selector.d.ts @@ -22,7 +22,6 @@ import { import BaseWidget, { BaseWidgetOptions, BaseWidgetTooltip, - Font, FileSavingEventInfo, ExportInfo, IncidentInfo, @@ -39,6 +38,7 @@ import { TimeIntervalConfig, VisualRange, VisualRangeUpdateMode, + Font, } from '../common/charts'; import { SliderValueChangeMode } from '../common'; diff --git a/packages/devextreme/js/viz/sankey.d.ts b/packages/devextreme/js/viz/sankey.d.ts index c85f2aa27d29..981dee2f9ae1 100644 --- a/packages/devextreme/js/viz/sankey.d.ts +++ b/packages/devextreme/js/viz/sankey.d.ts @@ -19,7 +19,6 @@ import { import BaseWidget, { BaseWidgetOptions, BaseWidgetTooltip, - Font, FileSavingEventInfo, ExportInfo, IncidentInfo, @@ -34,6 +33,7 @@ import { Palette, PaletteExtensionMode, TextOverflow, + Font, } from '../common/charts'; export { diff --git a/packages/devextreme/js/viz/tree_map.d.ts b/packages/devextreme/js/viz/tree_map.d.ts index b07ac560389b..4270731fecfe 100644 --- a/packages/devextreme/js/viz/tree_map.d.ts +++ b/packages/devextreme/js/viz/tree_map.d.ts @@ -20,7 +20,6 @@ import BaseWidget, { BaseWidgetMargin, BaseWidgetOptions, BaseWidgetTooltip, - Font, FileSavingEventInfo, ExportInfo, IncidentInfo, @@ -34,6 +33,7 @@ import { Palette, PaletteExtensionMode, TextOverflow, + Font, WordWrap, } from '../common/charts'; diff --git a/packages/devextreme/js/viz/vector_map.d.ts b/packages/devextreme/js/viz/vector_map.d.ts index 78bdffb4828a..39a4d586c616 100644 --- a/packages/devextreme/js/viz/vector_map.d.ts +++ b/packages/devextreme/js/viz/vector_map.d.ts @@ -29,7 +29,6 @@ import BaseWidget, { BaseWidgetMargin, BaseWidgetOptions, BaseWidgetTooltip, - Font, BaseWidgetAnnotationConfig, FileSavingEventInfo, ExportInfo, @@ -43,6 +42,7 @@ import { import { Palette, + Font, } from '../common/charts'; import { diff --git a/packages/devextreme/ts/dx.all.d.ts b/packages/devextreme/ts/dx.all.d.ts index 594883fd1e9e..f5fac2d13a4e 100644 --- a/packages/devextreme/ts/dx.all.d.ts +++ b/packages/devextreme/ts/dx.all.d.ts @@ -1889,7 +1889,7 @@ declare module DevExpress.common.charts { /** * [descr:BaseLegend.font] */ - font?: DevExpress.viz.Font; + font?: Font; /** * [descr:BaseLegend.horizontalAlignment] */ @@ -1957,7 +1957,7 @@ declare module DevExpress.common.charts { /** * [descr:BaseLegend.title.font] */ - font?: DevExpress.viz.Font; + font?: Font; /** * [descr:BaseLegend.title.horizontalAlignment] */ @@ -1995,7 +1995,7 @@ declare module DevExpress.common.charts { /** * [descr:BaseLegend.title.subtitle.font] */ - font?: DevExpress.viz.Font; + font?: Font; /** * [descr:BaseLegend.title.subtitle.offset] */ @@ -2078,6 +2078,31 @@ declare module DevExpress.common.charts { export type ChartsLabelOverlap = 'hide' | 'none' | 'stack'; export type DashStyle = 'dash' | 'dot' | 'longDash' | 'solid'; export type DiscreteAxisDivisionMode = 'betweenLabels' | 'crossLabels'; + /** + * [descr:Font] + */ + export type Font = { + /** + * [descr:Font.color] + */ + color?: string; + /** + * [descr:Font.family] + */ + family?: string; + /** + * [descr:Font.opacity] + */ + opacity?: number; + /** + * [descr:Font.size] + */ + size?: string | number; + /** + * [descr:Font.weight] + */ + weight?: number; + }; /** * [descr:GradientColor] */ @@ -2223,7 +2248,7 @@ declare module DevExpress.common.charts { /** * [descr:dxChartSeriesTypes.CommonSeries.label.font] */ - font?: DevExpress.viz.Font; + font?: Font; /** * [descr:dxChartSeriesTypes.CommonSeries.label.format] */ @@ -30935,7 +30960,7 @@ declare module DevExpress.viz { /** * [descr:BaseGaugeOptions.scale.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:BaseGaugeOptions.scale.label.format] */ @@ -31399,7 +31424,7 @@ declare module DevExpress.viz { /** * [descr:BaseWidgetAnnotationConfig.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:BaseWidgetAnnotationConfig.height] */ @@ -31554,7 +31579,7 @@ declare module DevExpress.viz { /** * [descr:BaseWidgetOptions.loadingIndicator.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:BaseWidgetOptions.loadingIndicator.show] */ @@ -31695,7 +31720,7 @@ declare module DevExpress.viz { /** * [descr:BaseWidgetOptions.title.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:BaseWidgetOptions.title.horizontalAlignment] */ @@ -31735,7 +31760,7 @@ declare module DevExpress.viz { /** * [descr:BaseWidgetOptions.title.subtitle.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:BaseWidgetOptions.title.subtitle.offset] */ @@ -31824,7 +31849,7 @@ declare module DevExpress.viz { /** * [descr:BaseWidgetOptions.tooltip.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:BaseWidgetOptions.tooltip.format] */ @@ -32076,7 +32101,7 @@ declare module DevExpress.viz { /** * [descr:CommonIndicator.text.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:CommonIndicator.text.format] */ @@ -32334,7 +32359,7 @@ declare module DevExpress.viz { /** * [descr:dxBarGaugeOptions.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxBarGaugeOptions.label.format] */ @@ -33042,7 +33067,7 @@ declare module DevExpress.viz { /** * [descr:dxChartOptions.commonAxisSettings.constantLineStyle.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxChartOptions.commonAxisSettings.constantLineStyle.label.position] */ @@ -33076,7 +33101,7 @@ declare module DevExpress.viz { /** * [descr:dxChartOptions.commonAxisSettings.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxChartOptions.commonAxisSettings.label.indentFromAxis] */ @@ -33136,7 +33161,7 @@ declare module DevExpress.viz { /** * [descr:dxChartOptions.commonAxisSettings.stripStyle.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxChartOptions.commonAxisSettings.stripStyle.label.horizontalAlignment] */ @@ -33157,7 +33182,7 @@ declare module DevExpress.viz { /** * [descr:dxChartOptions.commonAxisSettings.title.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxChartOptions.commonAxisSettings.title.margin] */ @@ -33949,7 +33974,7 @@ declare module DevExpress.viz { /** * [descr:dxChartOptions.crosshair.horizontalLine.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxChartOptions.crosshair.horizontalLine.label.format] */ @@ -33992,7 +34017,7 @@ declare module DevExpress.viz { /** * [descr:dxChartOptions.crosshair.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxChartOptions.crosshair.label.format] */ @@ -34038,7 +34063,7 @@ declare module DevExpress.viz { /** * [descr:dxChartOptions.crosshair.verticalLine.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxChartOptions.crosshair.verticalLine.label.format] */ @@ -36550,7 +36575,7 @@ declare module DevExpress.viz { /** * [descr:dxFunnelOptions.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxFunnelOptions.label.format] */ @@ -37275,7 +37300,7 @@ declare module DevExpress.viz { /** * [descr:dxPieChartSeriesTypes.CommonPieChartSeries.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxPieChartSeriesTypes.CommonPieChartSeries.label.format] */ @@ -37756,7 +37781,7 @@ declare module DevExpress.viz { /** * [descr:dxPolarChartOptions.commonAxisSettings.constantLineStyle.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxPolarChartOptions.commonAxisSettings.constantLineStyle.label.visible] */ @@ -37769,7 +37794,7 @@ declare module DevExpress.viz { /** * [descr:dxPolarChartOptions.commonAxisSettings.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxPolarChartOptions.commonAxisSettings.label.indentFromAxis] */ @@ -37824,7 +37849,7 @@ declare module DevExpress.viz { /** * [descr:dxPolarChartOptions.commonAxisSettings.stripStyle.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; }; /** * [descr:dxPolarChartCommonAxisSettingsTick] @@ -38900,7 +38925,7 @@ declare module DevExpress.viz { /** * [descr:dxPolarChartSeriesTypes.CommonPolarChartSeries.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxPolarChartSeriesTypes.CommonPolarChartSeries.label.format] */ @@ -39483,7 +39508,7 @@ declare module DevExpress.viz { /** * [descr:dxRangeSelectorOptions.scale.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxRangeSelectorOptions.scale.label.format] */ @@ -39697,7 +39722,7 @@ declare module DevExpress.viz { /** * [descr:dxRangeSelectorOptions.sliderMarker.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxRangeSelectorOptions.sliderMarker.format] */ @@ -40027,7 +40052,7 @@ declare module DevExpress.viz { /** * [descr:dxSankeyOptions.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxSankeyOptions.label.horizontalOffset] */ @@ -40818,7 +40843,7 @@ declare module DevExpress.viz { /** * [descr:dxTreeMapOptions.group.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxTreeMapOptions.group.label.textOverflow] */ @@ -40977,7 +41002,7 @@ declare module DevExpress.viz { /** * [descr:dxTreeMapOptions.tile.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxTreeMapOptions.tile.label.textOverflow] */ @@ -41168,7 +41193,7 @@ declare module DevExpress.viz { /** * [descr:dxVectorMapOptions.legends.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; /** * [descr:dxVectorMapOptions.legends.markerColor] */ @@ -41463,7 +41488,7 @@ declare module DevExpress.viz { /** * [descr:dxVectorMapOptions.layers.label.font] */ - font?: Font; + font?: DevExpress.common.charts.Font; }; /** * [descr:dxVectorMapOptions.layers.maxSize] @@ -41543,7 +41568,11 @@ declare module DevExpress.viz { hoveredBorderColor?: string; hoveredBorderWidth?: number; hoveredColor?: string; - label?: { dataField?: string; enabled?: boolean; font?: Font }; + label?: { + dataField?: string; + enabled?: boolean; + font?: DevExpress.common.charts.Font; + }; maxSize?: number; minSize?: number; name?: string; @@ -41689,32 +41718,12 @@ declare module DevExpress.viz { svgToCanvas?: Function; } ): void; + /** - * [descr:Font] + * @deprecated Use Font from common/charts instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ - export interface Font { - /** - * [descr:Font.color] - */ - color?: string; - /** - * [descr:Font.family] - */ - family?: string; - /** - * [descr:Font.opacity] - */ - opacity?: number; - /** - * [descr:Font.size] - */ - size?: string | number; - /** - * [descr:Font.weight] - */ - weight?: number; - } + export type Font = DevExpress.common.charts.Font; /** * @deprecated Use LegendItem instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.