diff --git a/packages/react-charts/src/components/ChartTheme/ChartThemeTypes.ts b/packages/react-charts/src/components/ChartTheme/ChartThemeTypes.ts index 0ce2ec9a558..a9659051ed2 100644 --- a/packages/react-charts/src/components/ChartTheme/ChartThemeTypes.ts +++ b/packages/react-charts/src/components/ChartTheme/ChartThemeTypes.ts @@ -1,28 +1,5 @@ import { ChartComponentThemeDefinition, ChartThemeDefinition } from './ChartTheme'; -import { AxisTheme } from './themes/components/axis-theme'; import { BaseComponentTheme, BaseTheme } from './themes/base-theme'; -import { - BulletTheme, - BulletComparativeErrorMeasureTheme, - BulletComparativeMeasureTheme, - BulletComparativeWarningMeasureTheme, - BulletGroupTitleTheme, - BulletPrimaryDotMeasureTheme, - BulletPrimaryNegativeMeasureTheme, - BulletPrimarySegmentedMeasureTheme, - BulletQualitativeRangeTheme -} from './themes/components/bullet-theme'; -import { DonutTheme } from './themes/components/donut-theme'; -import { DonutThresholdDynamicTheme, DonutThresholdStaticTheme } from './themes/components/donut-threshold-theme'; -import { DonutUtilizationDynamicTheme, DonutUtilizationStaticTheme } from './themes/components/donut-utilization-theme'; -import { ThresholdTheme } from './themes/components/threshold-theme'; - -/** - * Axis theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartAxisTheme: ChartThemeDefinition = AxisTheme; /** * Base theme @@ -36,108 +13,3 @@ export const ChartBaseTheme: ChartThemeDefinition = BaseTheme; * @beta */ export const ChartBaseComponentTheme: ChartComponentThemeDefinition = BaseComponentTheme; - -/** - * Bullet comparative error measure theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletComparativeErrorMeasureTheme: ChartThemeDefinition = BulletComparativeErrorMeasureTheme; - -/** - * Bullet comparative measure theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletComparativeMeasureTheme: ChartThemeDefinition = BulletComparativeMeasureTheme; - -/** - * Bullet comparative measure warning theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletComparativeWarningMeasureTheme: ChartThemeDefinition = BulletComparativeWarningMeasureTheme; - -/** - * Bullet group title theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletGroupTitleTheme: ChartThemeDefinition = BulletGroupTitleTheme; - -/** - * Bullet primary dot measure theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletPrimaryDotMeasureTheme: ChartThemeDefinition = BulletPrimaryDotMeasureTheme; - -/** - * Bullet primary negative measure theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletPrimaryNegativeMeasureTheme: ChartThemeDefinition = BulletPrimaryNegativeMeasureTheme; - -/** - * Bullet primary segmented measure theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletPrimarySegmentedMeasureTheme: ChartThemeDefinition = BulletPrimarySegmentedMeasureTheme; - -/** - * Bullet qualitative range theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletQualitativeRangeTheme: ChartThemeDefinition = BulletQualitativeRangeTheme; - -/** - * Bullet theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartBulletTheme: ChartThemeDefinition = BulletTheme; - -/** - * Donut utilization dynamic theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartDonutUtilizationDynamicTheme: ChartThemeDefinition = DonutUtilizationDynamicTheme; - -/** - * Donut utilization static theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartDonutUtilizationStaticTheme: ChartThemeDefinition = DonutUtilizationStaticTheme; - -/** - * Donut theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartDonutTheme: ChartThemeDefinition = DonutTheme; - -/** - * Donut threshold dynamic theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartDonutThresholdDynamicTheme: ChartThemeDefinition = DonutThresholdDynamicTheme; - -/** - * Donut threshold static theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartDonutThresholdStaticTheme: ChartThemeDefinition = DonutThresholdStaticTheme; - -/** - * Threshold static theme - * @private - * @deprecated See ChartBaseComponentTheme - */ -export const ChartThresholdTheme: ChartThemeDefinition = ThresholdTheme; diff --git a/packages/react-charts/src/components/ChartTheme/themes/components/axis-theme.ts b/packages/react-charts/src/components/ChartTheme/themes/components/axis-theme.ts deleted file mode 100644 index 73ae707e5db..00000000000 --- a/packages/react-charts/src/components/ChartTheme/themes/components/axis-theme.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable camelcase */ -import chart_axis_grid_stroke_Color from '@patternfly/react-tokens/dist/esm/chart_axis_grid_stroke_Color'; -import chart_axis_tick_stroke_Color from '@patternfly/react-tokens/dist/esm/chart_axis_tick_stroke_Color'; - -/** - * Axis theme - * @private - * @deprecated See BaseComponentTheme - */ -export const AxisTheme = { - axis: { - style: { - grid: { - stroke: chart_axis_grid_stroke_Color.var - }, - ticks: { - stroke: chart_axis_tick_stroke_Color.var - } - } - } -}; diff --git a/packages/react-charts/src/components/ChartTheme/themes/components/bullet-theme.ts b/packages/react-charts/src/components/ChartTheme/themes/components/bullet-theme.ts deleted file mode 100644 index fe27d15fda4..00000000000 --- a/packages/react-charts/src/components/ChartTheme/themes/components/bullet-theme.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* eslint-disable camelcase */ -import chart_bullet_Height from '@patternfly/react-tokens/dist/esm/chart_bullet_Height'; -import chart_bullet_comparative_measure_Fill_Color from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_Fill_Color'; -import chart_bullet_comparative_measure_stroke_Color from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_stroke_Color'; -import chart_bullet_comparative_measure_stroke_Width from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_stroke_Width'; -import chart_bullet_comparative_measure_error_Fill_Color from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_error_Fill_Color'; -import chart_bullet_comparative_measure_error_stroke_Color from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_error_stroke_Color'; -import chart_bullet_comparative_measure_error_stroke_Width from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_error_stroke_Width'; -import chart_bullet_comparative_measure_warning_Fill_Color from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_warning_Fill_Color'; -import chart_bullet_comparative_measure_warning_stroke_Color from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_warning_stroke_Color'; -import chart_bullet_comparative_measure_warning_stroke_Width from '@patternfly/react-tokens/dist/esm/chart_bullet_comparative_measure_warning_stroke_Width'; -import chart_bullet_group_title_divider_Fill_Color from '@patternfly/react-tokens/dist/esm/chart_bullet_group_title_divider_Fill_Color'; -import chart_bullet_group_title_divider_stroke_Color from '@patternfly/react-tokens/dist/esm/chart_bullet_group_title_divider_stroke_Color'; -import chart_bullet_group_title_divider_stroke_Width from '@patternfly/react-tokens/dist/esm/chart_bullet_group_title_divider_stroke_Width'; -import chart_bullet_qualitative_range_ColorScale_100 from '@patternfly/react-tokens/dist/esm/chart_bullet_qualitative_range_ColorScale_100'; -import chart_bullet_qualitative_range_ColorScale_200 from '@patternfly/react-tokens/dist/esm/chart_bullet_qualitative_range_ColorScale_200'; -import chart_bullet_qualitative_range_ColorScale_300 from '@patternfly/react-tokens/dist/esm/chart_bullet_qualitative_range_ColorScale_300'; -import chart_bullet_qualitative_range_ColorScale_400 from '@patternfly/react-tokens/dist/esm/chart_bullet_qualitative_range_ColorScale_400'; -import chart_bullet_qualitative_range_ColorScale_500 from '@patternfly/react-tokens/dist/esm/chart_bullet_qualitative_range_ColorScale_500'; -import chart_bullet_negative_measure_ColorScale_100 from '@patternfly/react-tokens/dist/esm/chart_bullet_negative_measure_ColorScale_100'; -import chart_bullet_negative_measure_ColorScale_200 from '@patternfly/react-tokens/dist/esm/chart_bullet_negative_measure_ColorScale_200'; -import chart_bullet_negative_measure_ColorScale_300 from '@patternfly/react-tokens/dist/esm/chart_bullet_negative_measure_ColorScale_300'; -import chart_bullet_negative_measure_ColorScale_400 from '@patternfly/react-tokens/dist/esm/chart_bullet_negative_measure_ColorScale_400'; -import chart_bullet_negative_measure_ColorScale_500 from '@patternfly/react-tokens/dist/esm/chart_bullet_negative_measure_ColorScale_500'; -import chart_global_layout_Padding from '@patternfly/react-tokens/dist/esm/chart_global_layout_Padding'; - -// See https://docs.google.com/document/d/1cw10pJFXWruB1SA8TQwituxn5Ss6KpxYPCOYGrH8qAY/edit# -// See https://www.patternfly.org/v3/pattern-library/data-visualization/bullet-chart/#design - -/** - * Bullet theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletTheme = { - chart: { - height: chart_bullet_Height.value - } -}; - -/** - * Bullet comparative error measure theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletComparativeErrorMeasureTheme = { - bar: { - height: chart_bullet_Height.value, - style: { - data: { - fill: chart_bullet_comparative_measure_error_Fill_Color.var, - stroke: chart_bullet_comparative_measure_error_stroke_Color.var, - strokeWidth: chart_bullet_comparative_measure_error_stroke_Width.value - } - } - } -}; - -/** - * Bullet comparative measure theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletComparativeMeasureTheme = { - bar: { - height: chart_bullet_Height.value, - style: { - data: { - fill: chart_bullet_comparative_measure_Fill_Color.var, - stroke: chart_bullet_comparative_measure_stroke_Color.var, - strokeWidth: chart_bullet_comparative_measure_stroke_Width.value - } - } - } -}; - -/** - * Bullet comparative measure warning theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletComparativeWarningMeasureTheme = { - bar: { - height: chart_bullet_Height.value, - style: { - data: { - fill: chart_bullet_comparative_measure_warning_Fill_Color.var, - stroke: chart_bullet_comparative_measure_warning_stroke_Color.var, - strokeWidth: chart_bullet_comparative_measure_warning_stroke_Width.value - } - } - } -}; - -/** - * Bullet group title theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletGroupTitleTheme = { - chart: { - padding: { - bottom: 0, - left: 0, - right: 0, - top: chart_global_layout_Padding.value - } as any // Victory incorrectly typed ThemeBaseProps.padding as number instead of PaddingProps - }, - line: { - style: { - data: { - fill: chart_bullet_group_title_divider_Fill_Color.var, - stroke: chart_bullet_group_title_divider_stroke_Color.var, - strokeWidth: chart_bullet_group_title_divider_stroke_Width.value - } - } - } -}; - -/** - * Bullet primary dot measure theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletPrimaryDotMeasureTheme = { - group: { - height: chart_bullet_Height.value - } -}; - -/** - * Bullet primary negative measure theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletPrimaryNegativeMeasureTheme = { - group: { - colorScale: [ - chart_bullet_negative_measure_ColorScale_100.var, - chart_bullet_negative_measure_ColorScale_200.var, - chart_bullet_negative_measure_ColorScale_300.var, - chart_bullet_negative_measure_ColorScale_400.var, - chart_bullet_negative_measure_ColorScale_500.var - ], - height: chart_bullet_Height.value - } -}; - -/** - * Bullet primary segmented measure theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletPrimarySegmentedMeasureTheme = { - group: { - height: chart_bullet_Height.value - } -}; - -/** - * Bullet qualitative range theme - * @private - * @deprecated See BaseComponentTheme - */ -export const BulletQualitativeRangeTheme = { - group: { - colorScale: [ - chart_bullet_qualitative_range_ColorScale_100.var, - chart_bullet_qualitative_range_ColorScale_200.var, - chart_bullet_qualitative_range_ColorScale_300.var, - chart_bullet_qualitative_range_ColorScale_400.var, - chart_bullet_qualitative_range_ColorScale_500.var - ], - height: chart_bullet_Height.value - } -}; diff --git a/packages/react-charts/src/components/ChartTheme/themes/components/donut-theme.ts b/packages/react-charts/src/components/ChartTheme/themes/components/donut-theme.ts deleted file mode 100644 index e2182a0de8c..00000000000 --- a/packages/react-charts/src/components/ChartTheme/themes/components/donut-theme.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-disable camelcase */ -import chart_donut_pie_Height from '@patternfly/react-tokens/dist/esm/chart_donut_pie_Height'; -import chart_donut_pie_angle_Padding from '@patternfly/react-tokens/dist/esm/chart_donut_pie_angle_Padding'; -import chart_donut_pie_Padding from '@patternfly/react-tokens/dist/esm/chart_donut_pie_Padding'; -import chart_donut_pie_Width from '@patternfly/react-tokens/dist/esm/chart_donut_pie_Width'; - -/** - * Donut theme - * @private - * @deprecated See BaseComponentTheme - */ -export const DonutTheme = { - pie: { - height: chart_donut_pie_Height.value, - padding: chart_donut_pie_Padding.value, - padAngle: chart_donut_pie_angle_Padding.value, - width: chart_donut_pie_Width.value - } -}; diff --git a/packages/react-charts/src/components/ChartTheme/themes/components/donut-threshold-theme.ts b/packages/react-charts/src/components/ChartTheme/themes/components/donut-threshold-theme.ts deleted file mode 100644 index 3ad71154a24..00000000000 --- a/packages/react-charts/src/components/ChartTheme/themes/components/donut-threshold-theme.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-disable camelcase */ -import chart_donut_threshold_first_Color from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_first_Color'; -import chart_donut_threshold_second_Color from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_second_Color'; -import chart_donut_threshold_third_Color from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_third_Color'; -import chart_donut_threshold_dynamic_pie_Height from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_dynamic_pie_Height'; -import chart_donut_threshold_dynamic_pie_Padding from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_dynamic_pie_Padding'; -import chart_donut_threshold_dynamic_pie_Width from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_dynamic_pie_Width'; -import chart_donut_threshold_static_pie_Height from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_static_pie_Height'; -import chart_donut_threshold_static_pie_angle_Padding from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_static_pie_angle_Padding'; -import chart_donut_threshold_static_pie_Padding from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_static_pie_Padding'; -import chart_donut_threshold_static_pie_Width from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_static_pie_Width'; - -/** - * Donut threshold dynamic theme - * @private - * @deprecated See BaseComponentTheme - */ -export const DonutThresholdDynamicTheme = { - legend: { - colorScale: [chart_donut_threshold_second_Color.var, chart_donut_threshold_third_Color.var] - }, - pie: { - height: chart_donut_threshold_dynamic_pie_Height.value, - padding: chart_donut_threshold_dynamic_pie_Padding.value, - width: chart_donut_threshold_dynamic_pie_Width.value - } -}; - -/** - * Donut threshold static theme - * @private - * @deprecated See BaseComponentTheme - */ -export const DonutThresholdStaticTheme = { - pie: { - colorScale: [ - chart_donut_threshold_first_Color.var, - chart_donut_threshold_second_Color.var, - chart_donut_threshold_third_Color.var - ], - height: chart_donut_threshold_static_pie_Height.value, - padAngle: chart_donut_threshold_static_pie_angle_Padding.value, - padding: chart_donut_threshold_static_pie_Padding.value, - width: chart_donut_threshold_static_pie_Width.value - } -}; diff --git a/packages/react-charts/src/components/ChartTheme/themes/components/donut-utilization-theme.ts b/packages/react-charts/src/components/ChartTheme/themes/components/donut-utilization-theme.ts deleted file mode 100644 index 48cc0f67894..00000000000 --- a/packages/react-charts/src/components/ChartTheme/themes/components/donut-utilization-theme.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable camelcase */ -import chart_donut_threshold_first_Color from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_first_Color'; -import chart_donut_threshold_second_Color from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_second_Color'; -import chart_donut_threshold_third_Color from '@patternfly/react-tokens/dist/esm/chart_donut_threshold_third_Color'; -import chart_donut_utilization_dynamic_pie_Height from '@patternfly/react-tokens/dist/esm/chart_donut_utilization_dynamic_pie_Height'; -import chart_donut_utilization_dynamic_pie_angle_Padding from '@patternfly/react-tokens/dist/esm/chart_donut_utilization_dynamic_pie_angle_Padding'; -import chart_donut_utilization_dynamic_pie_Padding from '@patternfly/react-tokens/dist/esm/chart_donut_utilization_dynamic_pie_Padding'; -import chart_donut_utilization_dynamic_pie_Width from '@patternfly/react-tokens/dist/esm/chart_donut_utilization_dynamic_pie_Width'; -import chart_donut_utilization_static_pie_Padding from '@patternfly/react-tokens/dist/esm/chart_donut_utilization_static_pie_Padding'; - -/** - * Donut utilization dynamic theme - * @private - * @deprecated See BaseComponentTheme - */ -export const DonutUtilizationDynamicTheme = { - pie: { - height: chart_donut_utilization_dynamic_pie_Height.value, - padding: chart_donut_utilization_dynamic_pie_Padding.value, - padAngle: chart_donut_utilization_dynamic_pie_angle_Padding.value, - width: chart_donut_utilization_dynamic_pie_Width.value - } -}; - -/** - * Donut utilization static theme - * @private - * @deprecated See BaseComponentTheme - */ -export const DonutUtilizationStaticTheme = { - legend: { - colorScale: [ - chart_donut_threshold_first_Color.var, - chart_donut_threshold_second_Color.var, - chart_donut_threshold_third_Color.var - ] - }, - pie: { - colorScale: [chart_donut_threshold_first_Color.var], - padding: chart_donut_utilization_static_pie_Padding.value - } -}; diff --git a/packages/react-charts/src/components/ChartTheme/themes/components/threshold-theme.ts b/packages/react-charts/src/components/ChartTheme/themes/components/threshold-theme.ts deleted file mode 100644 index ef43eae8442..00000000000 --- a/packages/react-charts/src/components/ChartTheme/themes/components/threshold-theme.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-disable camelcase */ -import chart_threshold_stroke_dash_array from '@patternfly/react-tokens/dist/esm/chart_threshold_stroke_dash_array'; -import chart_threshold_stroke_Width from '@patternfly/react-tokens/dist/esm/chart_threshold_stroke_Width'; - -/** - * Threshold theme - * @private - * @deprecated See BaseComponentTheme - */ -export const ThresholdTheme = { - line: { - style: { - data: { - strokeDasharray: chart_threshold_stroke_dash_array.value, - strokeWidth: chart_threshold_stroke_Width.value - } - } - } -};