diff --git a/packages/react-charting/src/components/CommonComponents/CartesianChart.base.tsx b/packages/react-charting/src/components/CommonComponents/CartesianChart.base.tsx index 475fcc021e41d2..2c7ca58ed424f8 100644 --- a/packages/react-charting/src/components/CommonComponents/CartesianChart.base.tsx +++ b/packages/react-charting/src/components/CommonComponents/CartesianChart.base.tsx @@ -510,7 +510,6 @@ export class CartesianChartBase extends React.Component { const yValueHoverSubCountsExists: boolean = this._yValueHoverSubCountsExists(calloutProps.YValueHover); - const { updatedTime } = this.props; return (
@@ -547,11 +546,12 @@ export class CartesianChartBase extends React.Component - {(!!calloutProps.descriptionMessage || !!updatedTime) &&
} {!!calloutProps.descriptionMessage && ( -
{calloutProps.descriptionMessage}
+ <> +
+
{calloutProps.descriptionMessage}
+ )} - {!!updatedTime &&
Updated {updatedTime.toLocaleString()}
}
); }; diff --git a/packages/react-charting/src/components/CommonComponents/CartesianChart.styles.ts b/packages/react-charting/src/components/CommonComponents/CartesianChart.styles.ts index 0105a3a521e852..ec3b227afe3ef5 100644 --- a/packages/react-charting/src/components/CommonComponents/CartesianChart.styles.ts +++ b/packages/react-charting/src/components/CommonComponents/CartesianChart.styles.ts @@ -148,10 +148,5 @@ export const getStyles = (props: ICartesianChartStyleProps): ICartesianChartStyl descriptionMessage: { fontSize: FontSizes.small, }, - - updatedTime: { - marginTop: '8px', - fontSize: FontSizes.small, - }, }; }; diff --git a/packages/react-charting/src/components/CommonComponents/CartesianChart.types.ts b/packages/react-charting/src/components/CommonComponents/CartesianChart.types.ts index 100dbafcdb4257..1c445ed8176b7c 100644 --- a/packages/react-charting/src/components/CommonComponents/CartesianChart.types.ts +++ b/packages/react-charting/src/components/CommonComponents/CartesianChart.types.ts @@ -146,11 +146,6 @@ export interface ICartesianChartStyles { * Styles for the group divider in callout */ divider?: IStyle; - - /** - * Styles for the updated time text in callout - */ - updatedTime?: IStyle; } export interface ICartesianChartProps { @@ -386,11 +381,6 @@ export interface ICartesianChartProps { * @defaultvalue ChartHoverCardVariant.ShortLegend */ calloutVariant?: ChartHoverCardVariant; - - /** - * Time at which the chart data was last updated - */ - updatedTime?: Date; } export interface IYValueHover { diff --git a/packages/react-charting/src/components/GaugeChart/GaugeChart.base.tsx b/packages/react-charting/src/components/GaugeChart/GaugeChart.base.tsx index f1a91c5d107a9f..130ad44a3fd357 100644 --- a/packages/react-charting/src/components/GaugeChart/GaugeChart.base.tsx +++ b/packages/react-charting/src/components/GaugeChart/GaugeChart.base.tsx @@ -519,7 +519,6 @@ export class GaugeChartBase extends React.Component { const yValueHoverSubCountsExists: boolean = this._yValueHoverSubCountsExists(calloutProps.YValueHover); - const { updatedTime } = this.props; return (
@@ -556,11 +555,12 @@ export class GaugeChartBase extends React.Component - {(!!calloutProps.descriptionMessage || !!updatedTime) &&
} {!!calloutProps.descriptionMessage && ( -
{calloutProps.descriptionMessage}
+ <> +
+
{calloutProps.descriptionMessage}
+ )} - {!!updatedTime &&
Updated {updatedTime.toLocaleString()}
}
); }; diff --git a/packages/react-charting/src/components/GaugeChart/GaugeChart.styles.ts b/packages/react-charting/src/components/GaugeChart/GaugeChart.styles.ts index cc2634c10c9d2a..fdab05b3b6e94f 100644 --- a/packages/react-charting/src/components/GaugeChart/GaugeChart.styles.ts +++ b/packages/react-charting/src/components/GaugeChart/GaugeChart.styles.ts @@ -106,10 +106,5 @@ export const getStyles = (props: IGaugeChartStyleProps): IGaugeChartStyles => { descriptionMessage: { fontSize: FontSizes.small, }, - - updatedTime: { - marginTop: '8px', - fontSize: FontSizes.small, - }, }; }; diff --git a/packages/react-charting/src/components/GaugeChart/GaugeChart.types.ts b/packages/react-charting/src/components/GaugeChart/GaugeChart.types.ts index 6c6ec4c3a37f64..469251c683e7ed 100644 --- a/packages/react-charting/src/components/GaugeChart/GaugeChart.types.ts +++ b/packages/react-charting/src/components/GaugeChart/GaugeChart.types.ts @@ -133,11 +133,6 @@ export interface IGaugeChartProps { * @defaultvalue ChartHoverCardVariant.ShortLegend */ calloutVariant?: ChartHoverCardVariant; - - /** - * Time at which the chart data was last updated - */ - updatedTime?: Date; } export interface IGaugeChartStyleProps { @@ -262,9 +257,4 @@ export interface IGaugeChartStyles { * Styles for the group divider in callout */ divider?: IStyle; - - /** - * Styles for the updated time text in callout - */ - updatedTime?: IStyle; } diff --git a/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.base.tsx b/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.base.tsx index e4c3247797a7d0..bdad69518b98ea 100644 --- a/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.base.tsx +++ b/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.base.tsx @@ -15,8 +15,7 @@ export class ChartHoverCardBase extends React.Component; public render(): React.ReactNode { - const { color, Legend, XValue, YValue, styles, theme, ratio, descriptionMessage, culture, variant, updatedTime } = - this.props; + const { color, Legend, XValue, YValue, styles, theme, ratio, descriptionMessage, culture, variant } = this.props; this._classNames = getClassNames(styles!, { theme: theme!, @@ -53,9 +52,12 @@ export class ChartHoverCardBase extends React.Component
- {(!!descriptionMessage || !!updatedTime) &&
} - {!!descriptionMessage &&
{descriptionMessage}
} - {!!updatedTime &&
Updated {updatedTime.toLocaleString()}
} + {!!descriptionMessage && ( + <> +
+
{descriptionMessage}
+ + )}
); } diff --git a/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.styles.ts b/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.styles.ts index bef250b142a906..2b61595d98a3f9 100644 --- a/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.styles.ts +++ b/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.styles.ts @@ -67,10 +67,5 @@ export const getChartHoverCardStyles = (props: IChartHoverCardStyleProps): IChar marginTop: '8px', marginBottom: '8px', }, - - updatedTime: { - marginTop: '8px', - fontSize: FontSizes.small, - }, }; }; diff --git a/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.types.ts b/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.types.ts index 25d7eb7b991a09..a5e5506719d730 100644 --- a/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.types.ts +++ b/packages/react-charting/src/utilities/ChartHoverCard/ChartHoverCard.types.ts @@ -54,11 +54,6 @@ export interface IChartHoverCardProps { * @defaultvalue ChartHoverCardVariant.ShortLegend */ variant?: ChartHoverCardVariant; - - /** - * Time at which the chart data was last updated - */ - updatedTime?: Date; } export interface IChartHoverCardStyles { @@ -121,11 +116,6 @@ export interface IChartHoverCardStyles { * styles for the group divider */ divider?: IStyle; - - /** - * styles for the updated time text - */ - updatedTime?: IStyle; } export interface IChartHoverCardStyleProps {