From e645d0ec903988d50f72a03048912cb1768dd2ba Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Wed, 28 Jun 2023 09:55:10 +0530 Subject: [PATCH 01/22] focus indicator bug fix in bar chart --- .../HorizontalBarChart.base.tsx | 44 ++++++++++++++-- .../HorizontalBarChart.styles.ts | 7 ++- .../MultiStackedBarChart.base.tsx | 51 ++++++++++++++++--- .../MultiStackedBarChart.styles.ts | 4 -- 4 files changed, 87 insertions(+), 19 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx index d9dbd7ac344252..6aafbb8cd62dd5 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx +++ b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx @@ -16,6 +16,7 @@ import { ChartHoverCard, convertToLocaleString, getAccessibleDataObject } from ' import { FocusZone, FocusZoneDirection } from '@fluentui/react-focus'; import { formatPrefix as d3FormatPrefix } from 'd3-format'; import { FocusableTooltipText } from '../../utilities/FocusableTooltipText'; +import { clamp } from '@fluentui/react'; const getClassNames = classNamesFunction(); @@ -31,6 +32,7 @@ export interface IHorizontalBarChartState { barCalloutProps?: IChartDataPoint; callOutAccessibilityData?: IAccessibilityProps; emptyChart?: boolean; + barSpacing: number; } export class HorizontalBarChartBase extends React.Component { @@ -41,6 +43,7 @@ export class HorizontalBarChartBase extends React.Component; constructor(props: IHorizontalBarChartProps) { super(props); @@ -55,11 +58,13 @@ export class HorizontalBarChartBase extends React.Component(); } public componentDidMount(): void { @@ -67,6 +72,8 @@ export class HorizontalBarChartBase extends React.Component {points!.chartData![0].data && this._createBenchmark(points!)} - + elements, which form the bars + * For each bar an x value, and a width needs to be specified + * The computations are done based on percentages + * Extra margin is also provided, in the x value to provide some spacing + */ + private _createBars(data: IChartProps, palette: IPalette): JSX.Element[] { + const noOfBars = + data.chartData?.reduce( + (count: number, point: IChartDataPoint) => (count += (point.horizontalBarChartdata?.x || 0) > 0 ? 1 : 0), + 0, + ) || 1; + const totalMargin = this.state.barSpacing * (noOfBars - 1); const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black]; // calculating starting point of each bar and it's range const startingPoint: number[] = []; - const total = data.chartData!.reduce( + let total = data.chartData!.reduce( (acc: number, point: IChartDataPoint) => acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0), 0, ); + + total += (totalMargin * total) / (100 - totalMargin); + let prevPosition = 0; let value = 0; - let sumOfPercent = 0; + let sumOfPercent = totalMargin; data.chartData!.map((point: IChartDataPoint, index: number) => { const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0; value = (pointData / total) * 100; @@ -361,7 +393,11 @@ export class HorizontalBarChartBase extends React.Component(); @@ -39,6 +40,7 @@ export interface IMultiStackedBarChartState { callOutAccessibilityData?: IAccessibilityProps; calloutLegend: string; emptyChart?: boolean; + barSpacing: number; } export class MultiStackedBarChartBase extends React.Component { @@ -53,6 +55,7 @@ export class MultiStackedBarChartBase extends React.Component; public constructor(props: IMultiStackedBarChartProps) { super(props); @@ -68,10 +71,12 @@ export class MultiStackedBarChartBase extends React.Component(); } public componentDidMount(): void { @@ -83,6 +88,8 @@ export class MultiStackedBarChartBase extends React.Component elements, which form the bars + * For each bar an x value, and a width needs to be specified + * The computations are done based on percentages + * Extra margin is also provided, in the x value to provide some spacing + */ + private _createBarsAndLegends( data: IChartProps, barHeight: number, @@ -159,6 +184,11 @@ export class MultiStackedBarChartBase extends React.Component (count += (point.data || 0) > 0 ? 1 : 0), 0) || + 1; + const totalMargin = barSpacing * (noOfBars - 1); const { culture } = this.props; const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black]; // calculating starting point of each bar and it's range @@ -167,10 +197,12 @@ export class MultiStackedBarChartBase extends React.Component acc + (point.data ? point.data : 0), 0, ); - const total = + let total = this.props.variant === MultiStackedBarChartVariant.AbsoluteScale ? this._longestBarTotalValue : barTotalValue; - let sumOfPercent = 0; + total += (totalMargin * total) / (100 - totalMargin); + + let sumOfPercent = totalMargin; data.chartData!.map((point: IChartDataPoint, index: number) => { const pointData = point.data ? point.data : 0; value = (pointData / total) * 100 ? (pointData / total) * 100 : 0; @@ -253,7 +285,11 @@ export class MultiStackedBarChartBase extends React.Component
- + {bars}
diff --git a/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.styles.ts b/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.styles.ts index 39c68270760b95..e571b68a29e660 100644 --- a/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.styles.ts +++ b/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.styles.ts @@ -49,8 +49,6 @@ export const getMultiStackedBarChartStyles = (props: IMultiStackedBarChartStyleP opacityChangeOnHover: { opacity: shouldHighlight ? '' : '0.1', cursor: href ? 'pointer' : 'default', - stroke: theme.palette.white, - strokeWidth: 2, selectors: { '&:focus': { stroke: theme.palette.black, @@ -70,8 +68,6 @@ export const getMultiStackedBarChartStyles = (props: IMultiStackedBarChartStyleP placeHolderOnHover: { opacity: shouldHighlight ? '' : '0.1', cursor: 'default', - stroke: theme.palette.white, - strokeWidth: '2', selectors: { '&:focus': { stroke: theme.palette.black, From 543b005b30b27479f2cf4d06f2db3a4b96adbfd0 Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Wed, 28 Jun 2023 14:59:30 +0530 Subject: [PATCH 02/22] added bars spacing adjustment factor --- .../HorizontalBarChart.base.tsx | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx index 6aafbb8cd62dd5..291f96ac31c7d3 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx +++ b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx @@ -182,15 +182,6 @@ export class HorizontalBarChartBase extends React.Component elements, which form the bars + * This functions returns an array of elements, which form the bars * For each bar an x value, and a width needs to be specified * The computations are done based on percentages - * Extra margin is also provided, in the x value to provide some spacing + * Extra margin is also provided, in the x value to provide some spacing in between the bars */ private _createBars(data: IChartProps, palette: IPalette): JSX.Element[] { @@ -317,7 +318,7 @@ export class HorizontalBarChartBase extends React.Component (count += (point.horizontalBarChartdata?.x || 0) > 0 ? 1 : 0), 0, ) || 1; - const totalMargin = this.state.barSpacing * (noOfBars - 1); + const totalSpacing = this.state.barSpacing * (noOfBars - 1); const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black]; // calculating starting point of each bar and it's range const startingPoint: number[] = []; @@ -327,12 +328,12 @@ export class HorizontalBarChartBase extends React.Component { const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0; value = (pointData / total) * 100; From b31bd7c475843c0bd22be89b104856e6b081770a Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Wed, 28 Jun 2023 15:34:01 +0530 Subject: [PATCH 03/22] resolving eslint issues --- .../components/StackedBarChart/MultiStackedBarChart.base.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.base.tsx b/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.base.tsx index 5ad33b45556c89..fde0b850d5f19f 100644 --- a/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.base.tsx +++ b/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.base.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { RefObject, classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities'; +import { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities'; import { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling'; import { ILegend, Legends } from '../Legends/index'; import { From 9fbe4f329e655349166eda244bb443f566164cea Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Thu, 29 Jun 2023 09:35:31 +0530 Subject: [PATCH 04/22] updated snapshots, for horizontal bar chart and multistacked bar chart --- .../HorizontalBarChart.test.tsx.snap | 112 +++++------ .../MultiStackedBarChart.test.tsx.snap | 186 ++++++------------ 2 files changed, 104 insertions(+), 194 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap index 53719454a46700..8fdf6ab7dd3647 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap +++ b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap @@ -122,6 +122,8 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo className= { + border-width: 2px; + border: #ffffff; display: block; height: 12px; overflow: visible; @@ -137,10 +139,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="2020/04/30, 94%." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={true} fill="#004b50" height={12} @@ -150,7 +149,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo onMouseLeave={[Function]} onMouseOver={[Function]} role="img" - width="10.286666666666665%" + width="10.235233333333333%" x="0%" y={0} /> @@ -158,10 +157,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="13457/15000." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={false} fill="#edebe9" height={12} @@ -169,8 +165,8 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo onBlur={[Function]} onMouseLeave={[Function]} role="img" - width="89.71333333333334%" - x="10.286666666666665%" + width="89.26476666666667%" + x="10.735233333333333%" y={0} /> @@ -289,6 +285,8 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo className= { + border-width: 2px; + border: #ffffff; display: block; height: 12px; overflow: visible; @@ -304,10 +302,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="2020/04/30, 19%." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={true} fill="#5c2d91" height={12} @@ -317,7 +312,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo onMouseLeave={[Function]} onMouseOver={[Function]} role="img" - width="5.333333333333334%" + width="5.306666666666667%" x="0%" y={0} /> @@ -325,10 +320,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="14200/15000." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={false} fill="#edebe9" height={12} @@ -336,8 +328,8 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo onBlur={[Function]} onMouseLeave={[Function]} role="img" - width="94.66666666666667%" - x="5.333333333333334%" + width="94.19333333333333%" + x="5.806666666666667%" y={0} /> @@ -632,6 +624,8 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m className= { + border-width: 2px; + border: #ffffff; display: block; height: 12px; overflow: visible; @@ -647,10 +641,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="2020/04/30, 94%." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={true} fill="#004b50" height={12} @@ -660,7 +651,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m onMouseLeave={[Function]} onMouseOver={[Function]} role="img" - width="10.286666666666665%" + width="10.235233333333333%" x="0%" y={0} /> @@ -668,10 +659,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="13457/15000." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={false} fill="#edebe9" height={12} @@ -679,8 +667,8 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m onBlur={[Function]} onMouseLeave={[Function]} role="img" - width="89.71333333333334%" - x="10.286666666666665%" + width="89.26476666666667%" + x="10.735233333333333%" y={0} /> @@ -799,6 +787,8 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m className= { + border-width: 2px; + border: #ffffff; display: block; height: 12px; overflow: visible; @@ -814,10 +804,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="2020/04/30, 19%." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={true} fill="#5c2d91" height={12} @@ -827,7 +814,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m onMouseLeave={[Function]} onMouseOver={[Function]} role="img" - width="5.333333333333334%" + width="5.306666666666667%" x="0%" y={0} /> @@ -835,10 +822,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="14200/15000." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={false} fill="#edebe9" height={12} @@ -846,8 +830,8 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m onBlur={[Function]} onMouseLeave={[Function]} role="img" - width="94.66666666666667%" - x="5.333333333333334%" + width="94.19333333333333%" + x="5.806666666666667%" y={0} /> @@ -1049,6 +1033,8 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs className= { + border-width: 2px; + border: #ffffff; display: block; height: 12px; overflow: visible; @@ -1063,10 +1049,7 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs aria-label="2020/04/30, 94%." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={true} fill="#004b50" height={12} @@ -1075,7 +1058,7 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs onMouseLeave={[Function]} onMouseOver={[Function]} role="img" - width="10.286666666666665%" + width="10.235233333333333%" x="0%" y={0} /> @@ -1181,6 +1164,8 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs className= { + border-width: 2px; + border: #ffffff; display: block; height: 12px; overflow: visible; @@ -1195,10 +1180,7 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs aria-label="2020/04/30, 19%." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={true} fill="#5c2d91" height={12} @@ -1207,7 +1189,7 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs onMouseLeave={[Function]} onMouseOver={[Function]} role="img" - width="5.333333333333334%" + width="5.306666666666667%" x="0%" y={0} /> @@ -1330,6 +1312,8 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian className= { + border-width: 2px; + border: #ffffff; display: block; height: 12px; overflow: visible; @@ -1344,10 +1328,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian aria-label="2020/04/30, 94%." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={true} fill="#004b50" height={12} @@ -1356,7 +1337,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian onMouseLeave={[Function]} onMouseOver={[Function]} role="img" - width="10.286666666666665%" + width="10.235233333333333%" x="0%" y={0} /> @@ -1374,7 +1355,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian } dominantBaseline="central" transform="translate(4)" - x="10.286666666666665%" + x="10.235233333333333%" y={6} > 1.5k @@ -1480,6 +1461,8 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian className= { + border-width: 2px; + border: #ffffff; display: block; height: 12px; overflow: visible; @@ -1494,10 +1477,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian aria-label="2020/04/30, 19%." className= - { - stroke-width: 2px; - stroke: #ffffff; - } + data-is-focusable={true} fill="#5c2d91" height={12} @@ -1506,7 +1486,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian onMouseLeave={[Function]} onMouseOver={[Function]} role="img" - width="5.333333333333334%" + width="5.306666666666667%" x="0%" y={0} /> @@ -1524,7 +1504,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian } dominantBaseline="central" transform="translate(4)" - x="5.333333333333334%" + x="5.306666666666667%" y={6} > 800 diff --git a/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap b/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap index 768da972c94ff0..b27d312bc664f5 100644 --- a/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap +++ b/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap @@ -160,8 +160,6 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -180,7 +178,7 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on fill="#e81123" height={12} key="0" - width="63.49206349206349%" + width="62.22222222222222%" x="0%" y={0} /> @@ -192,8 +190,6 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -212,8 +208,8 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on fill="#107c10" height={12} key="1" - width="36.507936507936506%" - x="63.49206349206349%" + width="35.77777777777778%" + x="64.22222222222223%" y={0} /> @@ -366,8 +362,6 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -386,7 +380,7 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on fill="#0078d4" height={12} key="0" - width="63.49206349206349%" + width="62.22222222222222%" x="0%" y={0} /> @@ -398,8 +392,6 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -418,8 +410,8 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on fill="#107c10" height={12} key="1" - width="36.507936507936506%" - x="63.49206349206349%" + width="35.77777777777778%" + x="64.22222222222223%" y={0} /> @@ -824,8 +816,6 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -844,7 +834,7 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on fill="#e81123" height={12} key="0" - width="63.49206349206349%" + width="62.22222222222222%" x="0%" y={0} /> @@ -856,8 +846,6 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -876,8 +864,8 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on fill="#107c10" height={12} key="1" - width="36.507936507936506%" - x="63.49206349206349%" + width="35.77777777777778%" + x="64.22222222222223%" y={0} /> @@ -1030,8 +1018,6 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -1050,7 +1036,7 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on fill="#0078d4" height={12} key="0" - width="63.49206349206349%" + width="62.22222222222222%" x="0%" y={0} /> @@ -1062,8 +1048,6 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -1082,8 +1066,8 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on fill="#107c10" height={12} key="1" - width="36.507936507936506%" - x="63.49206349206349%" + width="35.77777777777778%" + x="64.22222222222223%" y={0} /> @@ -1379,8 +1363,6 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -1397,7 +1379,7 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a @@ -1409,8 +1391,6 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -1427,8 +1407,8 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a @@ -1553,8 +1533,6 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -1571,7 +1549,7 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a @@ -1583,8 +1561,6 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -1601,8 +1577,8 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a @@ -1820,8 +1796,6 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -1838,7 +1812,7 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari @@ -1850,8 +1824,6 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -1868,8 +1840,8 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari @@ -1884,8 +1856,9 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari } dominantBaseline="central" role="img" + textAnchor="start" transform="translate(4)" - x="100%" + x="98.078431372549%" y={6} > 63 @@ -2011,8 +1984,6 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -2029,7 +2000,7 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari @@ -2041,8 +2012,6 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -2059,8 +2028,8 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari @@ -2075,8 +2044,9 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari } dominantBaseline="central" role="img" + textAnchor="start" transform="translate(4)" - x="100%" + x="98.078431372549%" y={6} > 63 @@ -2321,8 +2291,6 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -2339,7 +2307,7 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr @@ -2351,8 +2319,6 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -2369,8 +2335,8 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr @@ -2521,8 +2487,6 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -2539,7 +2503,7 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr @@ -2551,8 +2515,6 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -2569,8 +2531,8 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr @@ -2804,8 +2766,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -2822,7 +2782,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly @@ -2834,8 +2794,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -2852,8 +2810,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly @@ -2994,8 +2952,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3012,7 +2968,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly @@ -3024,8 +2980,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3042,8 +2996,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly @@ -3287,8 +3241,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3305,7 +3257,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] @@ -3317,8 +3269,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3335,8 +3285,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] @@ -3487,8 +3437,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3505,7 +3453,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] @@ -3517,8 +3465,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3535,8 +3481,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] @@ -3683,8 +3629,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3701,7 +3645,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = @@ -3713,8 +3657,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3731,8 +3673,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = @@ -3883,8 +3825,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3901,7 +3841,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = @@ -3913,8 +3853,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -3931,8 +3869,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = @@ -4357,8 +4295,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -4375,7 +4311,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] @@ -4387,8 +4323,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -4405,8 +4339,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] @@ -4557,8 +4491,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -4575,7 +4507,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] @@ -4587,8 +4519,6 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { stroke-width: 2px; @@ -4605,8 +4535,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] From afb9f64183cf2bc0d51bcf0905cb0514f36bf538 Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Thu, 29 Jun 2023 10:32:20 +0530 Subject: [PATCH 05/22] pixel design issue fixed --- .../components/HorizontalBarChart/HorizontalBarChart.styles.ts | 2 -- .../components/StackedBarChart/MultiStackedBarChart.styles.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts index bca9eb6fbf0f9d..72bb1161dfcb17 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts +++ b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts @@ -26,8 +26,6 @@ export const getHorizontalBarChartStyles = (props: IHorizontalBarChartStyleProps height: barHeight ? barHeight : 12, display: 'block', overflow: 'visible', - border: theme.palette.white, - borderWidth: 2, }, barWrapper: {}, chartTitle: { diff --git a/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.styles.ts b/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.styles.ts index e571b68a29e660..149fbaf0ac6f1b 100644 --- a/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.styles.ts +++ b/packages/react-charting/src/components/StackedBarChart/MultiStackedBarChart.styles.ts @@ -70,7 +70,7 @@ export const getMultiStackedBarChartStyles = (props: IMultiStackedBarChartStyleP cursor: 'default', selectors: { '&:focus': { - stroke: theme.palette.black, + stroke: theme.palette.blue, strokeWidth: '2px', }, }, From ef4a855ab8f0ec1d4c9554ccf975f5de65089d4c Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Thu, 29 Jun 2023 12:05:24 +0530 Subject: [PATCH 06/22] snapshot updated --- .../HorizontalBarChart.test.tsx.snap | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap index 8fdf6ab7dd3647..3c0a0b0cb3c6cd 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap +++ b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap @@ -122,8 +122,6 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo className= { - border-width: 2px; - border: #ffffff; display: block; height: 12px; overflow: visible; @@ -285,8 +283,6 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo className= { - border-width: 2px; - border: #ffffff; display: block; height: 12px; overflow: visible; @@ -624,8 +620,6 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m className= { - border-width: 2px; - border: #ffffff; display: block; height: 12px; overflow: visible; @@ -787,8 +781,6 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m className= { - border-width: 2px; - border: #ffffff; display: block; height: 12px; overflow: visible; @@ -1033,8 +1025,6 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs className= { - border-width: 2px; - border: #ffffff; display: block; height: 12px; overflow: visible; @@ -1164,8 +1154,6 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs className= { - border-width: 2px; - border: #ffffff; display: block; height: 12px; overflow: visible; @@ -1312,8 +1300,6 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian className= { - border-width: 2px; - border: #ffffff; display: block; height: 12px; overflow: visible; @@ -1461,8 +1447,6 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian className= { - border-width: 2px; - border: #ffffff; display: block; height: 12px; overflow: visible; From 7763568c08319eff1f24dc6243b084d2339cd81d Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Thu, 29 Jun 2023 12:57:53 +0530 Subject: [PATCH 07/22] added change, and fixed stroke thickness in horizontal bar chart --- ...ct-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json | 7 +++++++ .../HorizontalBarChart/HorizontalBarChart.styles.ts | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 change/@fluentui-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json diff --git a/change/@fluentui-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json b/change/@fluentui-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json new file mode 100644 index 00000000000000..d715f37320cddc --- /dev/null +++ b/change/@fluentui-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Fixed the focus indicator bug in horizontal bar chart and multi stack bar chart", + "packageName": "@fluentui/react-charting", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts index 72bb1161dfcb17..a58f7dc4c62ac4 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts +++ b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts @@ -27,7 +27,14 @@ export const getHorizontalBarChartStyles = (props: IHorizontalBarChartStyleProps display: 'block', overflow: 'visible', }, - barWrapper: {}, + barWrapper: { + selectors: { + '&:focus': { + stroke: theme.palette.black, + strokeWidth: 2, + }, + }, + }, chartTitle: { ...theme.fonts.small, display: 'flex', From b3c4c41cc264ef0fe1b638b55b23b2d3482186c0 Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Mon, 3 Jul 2023 11:54:56 +0530 Subject: [PATCH 08/22] focus bug fixed --- .../HorizontalBarChart.test.tsx.snap | 60 +++++++++++++++---- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap index 3c0a0b0cb3c6cd..680744f54ccd28 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap +++ b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap @@ -137,7 +137,10 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="2020/04/30, 94%." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={true} fill="#004b50" height={12} @@ -155,7 +158,10 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="13457/15000." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={false} fill="#edebe9" height={12} @@ -298,7 +304,10 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="2020/04/30, 19%." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={true} fill="#5c2d91" height={12} @@ -316,7 +325,10 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="14200/15000." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={false} fill="#edebe9" height={12} @@ -635,7 +647,10 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="2020/04/30, 94%." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={true} fill="#004b50" height={12} @@ -653,7 +668,10 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="13457/15000." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={false} fill="#edebe9" height={12} @@ -796,7 +814,10 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="2020/04/30, 19%." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={true} fill="#5c2d91" height={12} @@ -814,7 +835,10 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="14200/15000." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={false} fill="#edebe9" height={12} @@ -1039,7 +1063,10 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs aria-label="2020/04/30, 94%." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={true} fill="#004b50" height={12} @@ -1168,7 +1195,10 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs aria-label="2020/04/30, 19%." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={true} fill="#5c2d91" height={12} @@ -1314,7 +1344,10 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian aria-label="2020/04/30, 94%." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={true} fill="#004b50" height={12} @@ -1461,7 +1494,10 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian aria-label="2020/04/30, 19%." className= - + &:focus { + stroke-width: 2px; + stroke: #000000; + } data-is-focusable={true} fill="#5c2d91" height={12} From ed3601f2031d78c44cf03cfd1556f1f21bc13197 Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Wed, 12 Jul 2023 15:38:36 +0530 Subject: [PATCH 09/22] added support for dark mode, fixed few PR comments --- .../HorizontalBarChart.base.tsx | 6 +++-- .../HorizontalBarChart.styles.ts | 1 + .../MultiStackedBarChart.base.tsx | 5 ++-- .../MultiStackedBarChart.styles.ts | 4 ++- .../HorizontalBarChart.Basic.Example.tsx | 8 +++++- .../MultiStackedBarChart.Variant.Example.tsx | 26 +++++++++++-------- 6 files changed, 32 insertions(+), 18 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx index 291f96ac31c7d3..84eb9ae50ea744 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx +++ b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.base.tsx @@ -299,8 +299,10 @@ export class HorizontalBarChartBase extends React.Component = () => { const hideRatio: boolean[] = [true, false]; @@ -104,5 +106,9 @@ export const HorizontalBarChartBasicExample: React.FunctionComponent<{}> = () => }, ]; - return ; + return ( + + ; + + ); }; diff --git a/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx b/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx index d5a1a45e7a4641..1c1e13c0d88eda 100644 --- a/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx +++ b/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx @@ -6,6 +6,8 @@ import { MultiStackedBarChartVariant, } from '@fluentui/react-charting'; import { Checkbox } from '@fluentui/react/lib/Checkbox'; +import { ThemeProvider } from '@fluentui/react'; +import { DarkTheme } from '@fluentui/theme-samples'; interface IMSBCVariantExampleState { hideLabels: boolean; @@ -107,17 +109,19 @@ export class MultiStackedBarChartVariantExample extends React.Component<{}, IMSB return ( <> - - + + + + ); } From b9b3974fdcf04126b93527fb144341ec40e3eeba Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Wed, 12 Jul 2023 18:50:34 +0530 Subject: [PATCH 10/22] updated snapshots --- .../HorizontalBarChart.test.tsx.snap | 12 +++++++ .../MultiStackedBarChart.test.tsx.snap | 36 +++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap index 680744f54ccd28..a1cfea4076a421 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap +++ b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap @@ -138,6 +138,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -159,6 +160,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -305,6 +307,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -326,6 +329,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -648,6 +652,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -669,6 +674,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -815,6 +821,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -836,6 +843,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1064,6 +1072,7 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1196,6 +1205,7 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1345,6 +1355,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1495,6 +1506,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian className= &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } diff --git a/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap b/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap index b27d312bc664f5..329f36a33c2c83 100644 --- a/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap +++ b/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap @@ -162,6 +162,7 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -192,6 +193,7 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -364,6 +366,7 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -394,6 +397,7 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -818,6 +822,7 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -848,6 +853,7 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1020,6 +1026,7 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1050,6 +1057,7 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1365,6 +1373,7 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1393,6 +1402,7 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1535,6 +1545,7 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1563,6 +1574,7 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1798,6 +1810,7 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1826,6 +1839,7 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -1986,6 +2000,7 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2014,6 +2029,7 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2293,6 +2309,7 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2321,6 +2338,7 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2489,6 +2507,7 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2517,6 +2536,7 @@ exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart corr opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2768,6 +2788,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2796,6 +2817,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2954,6 +2976,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -2982,6 +3005,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3243,6 +3267,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3271,6 +3296,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3439,6 +3465,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3467,6 +3494,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3631,6 +3659,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3659,6 +3688,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3827,6 +3857,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3855,6 +3886,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -4297,6 +4329,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -4325,6 +4358,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -4493,6 +4527,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -4521,6 +4556,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideTooltip correctly 1`] opacity: ; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } From d85e8f15ba8c57e7661f338523e8ed72d32db11d Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Wed, 12 Jul 2023 18:51:08 +0530 Subject: [PATCH 11/22] removed dark mode --- .../HorizontalBarChart.Basic.Example.tsx | 6 +---- .../MultiStackedBarChart.Variant.Example.tsx | 24 +++++++++---------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/packages/react-examples/src/react-charting/HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx b/packages/react-examples/src/react-charting/HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx index 70eeaafbf71c03..12b22e92147d25 100644 --- a/packages/react-examples/src/react-charting/HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx +++ b/packages/react-examples/src/react-charting/HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx @@ -106,9 +106,5 @@ export const HorizontalBarChartBasicExample: React.FunctionComponent<{}> = () => }, ]; - return ( - - ; - - ); + return ; }; diff --git a/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx b/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx index 1c1e13c0d88eda..dd5d5c35091dba 100644 --- a/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx +++ b/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx @@ -109,19 +109,17 @@ export class MultiStackedBarChartVariantExample extends React.Component<{}, IMSB return ( <> - - - - + + ); } From a11a5c7fa3caabdcf6935b86a640ac0fa30dd83b Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Thu, 13 Jul 2023 11:45:30 +0530 Subject: [PATCH 12/22] fixed linting error --- .../HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx | 2 -- .../MultiStackedBarChart.Variant.Example.tsx | 3 --- 2 files changed, 5 deletions(-) diff --git a/packages/react-examples/src/react-charting/HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx b/packages/react-examples/src/react-charting/HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx index 12b22e92147d25..d876fecad29e4f 100644 --- a/packages/react-examples/src/react-charting/HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx +++ b/packages/react-examples/src/react-charting/HorizontalBarChart/HorizontalBarChart.Basic.Example.tsx @@ -1,8 +1,6 @@ import * as React from 'react'; import { HorizontalBarChart, IChartProps } from '@fluentui/react-charting'; import { DefaultPalette } from '@fluentui/react/lib/Styling'; -import { ThemeProvider } from '@fluentui/react'; -import { DarkTheme } from '@fluentui/theme-samples'; export const HorizontalBarChartBasicExample: React.FunctionComponent<{}> = () => { const hideRatio: boolean[] = [true, false]; diff --git a/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx b/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx index dd5d5c35091dba..47478b21ad050c 100644 --- a/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx +++ b/packages/react-examples/src/react-charting/MultiStackedBarChart/MultiStackedBarChart.Variant.Example.tsx @@ -6,9 +6,6 @@ import { MultiStackedBarChartVariant, } from '@fluentui/react-charting'; import { Checkbox } from '@fluentui/react/lib/Checkbox'; -import { ThemeProvider } from '@fluentui/react'; -import { DarkTheme } from '@fluentui/theme-samples'; - interface IMSBCVariantExampleState { hideLabels: boolean; } From b8d4d420d95a248c7ef3612e300ad3668911a4d4 Mon Sep 17 00:00:00 2001 From: yush singla Date: Mon, 31 Jul 2023 10:49:08 +0530 Subject: [PATCH 13/22] bar chart fixes --- ...i-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json | 2 +- .../HorizontalBarChart/HorizontalBarChart.styles.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/change/@fluentui-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json b/change/@fluentui-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json index d715f37320cddc..609bfb15d61b81 100644 --- a/change/@fluentui-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json +++ b/change/@fluentui-react-charting-20c8ae70-f2a4-4ef4-89b6-7ca932f7481d.json @@ -2,6 +2,6 @@ "type": "patch", "comment": "Fixed the focus indicator bug in horizontal bar chart and multi stack bar chart", "packageName": "@fluentui/react-charting", - "email": "email not defined", + "email": "yushsingla@microsoft.com", "dependentChangeType": "patch" } diff --git a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts index 14b34dbc83c439..7250313d30ee09 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts +++ b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts @@ -30,9 +30,9 @@ export const getHorizontalBarChartStyles = (props: IHorizontalBarChartStyleProps barWrapper: { selectors: { '&:focus': { - outlineColor: theme.palette.black, + outline: 'none', stroke: theme.palette.black, - strokeWidth: 2, + strokeWidth: 1, }, }, }, From c40c4a0c7d02d8309ad42624afad66161c12117a Mon Sep 17 00:00:00 2001 From: yush singla Date: Mon, 31 Jul 2023 11:50:12 +0530 Subject: [PATCH 14/22] fixed the focus indicator width in horizontal bar chart --- .../HorizontalBarChart/HorizontalBarChart.styles.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts index 7250313d30ee09..72bb1161dfcb17 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts +++ b/packages/react-charting/src/components/HorizontalBarChart/HorizontalBarChart.styles.ts @@ -27,15 +27,7 @@ export const getHorizontalBarChartStyles = (props: IHorizontalBarChartStyleProps display: 'block', overflow: 'visible', }, - barWrapper: { - selectors: { - '&:focus': { - outline: 'none', - stroke: theme.palette.black, - strokeWidth: 1, - }, - }, - }, + barWrapper: {}, chartTitle: { ...theme.fonts.small, display: 'flex', From e4cf583806ee34a7c28fed58a31ab30a4d4e1a2b Mon Sep 17 00:00:00 2001 From: yush singla Date: Mon, 31 Jul 2023 15:33:48 +0530 Subject: [PATCH 15/22] updated snapshots --- .../HorizontalBarChart.test.tsx.snap | 72 ++++--------------- 1 file changed, 12 insertions(+), 60 deletions(-) diff --git a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap index a1cfea4076a421..3c0a0b0cb3c6cd 100644 --- a/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap +++ b/packages/react-charting/src/components/HorizontalBarChart/__snapshots__/HorizontalBarChart.test.tsx.snap @@ -137,11 +137,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="2020/04/30, 94%." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={true} fill="#004b50" height={12} @@ -159,11 +155,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="13457/15000." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={false} fill="#edebe9" height={12} @@ -306,11 +298,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="2020/04/30, 19%." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={true} fill="#5c2d91" height={12} @@ -328,11 +316,7 @@ exports[`HorizontalBarChart - mouse events Should render callout correctly on mo aria-label="14200/15000." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={false} fill="#edebe9" height={12} @@ -651,11 +635,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="2020/04/30, 94%." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={true} fill="#004b50" height={12} @@ -673,11 +653,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="13457/15000." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={false} fill="#edebe9" height={12} @@ -820,11 +796,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="2020/04/30, 19%." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={true} fill="#5c2d91" height={12} @@ -842,11 +814,7 @@ exports[`HorizontalBarChart - mouse events Should render customized callout on m aria-label="14200/15000." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={false} fill="#edebe9" height={12} @@ -1071,11 +1039,7 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs aria-label="2020/04/30, 94%." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={true} fill="#004b50" height={12} @@ -1204,11 +1168,7 @@ exports[`HorizontalBarChart snapShot testing Should not render bar labels in abs aria-label="2020/04/30, 19%." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={true} fill="#5c2d91" height={12} @@ -1354,11 +1314,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian aria-label="2020/04/30, 94%." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={true} fill="#004b50" height={12} @@ -1505,11 +1461,7 @@ exports[`HorizontalBarChart snapShot testing Should render absolute-scale varian aria-label="2020/04/30, 19%." className= - &:focus { - outline-color: #000000; - stroke-width: 2px; - stroke: #000000; - } + data-is-focusable={true} fill="#5c2d91" height={12} From 6ee0e2dfa76fe5076977295fe8b9418554d2514f Mon Sep 17 00:00:00 2001 From: Yush Singla Date: Wed, 16 Aug 2023 17:47:01 +0530 Subject: [PATCH 16/22] resolved snapshots --- .../MultiStackedBarChart.test.tsx.snap | 2086 ++--------------- .../MultiStackedBarChartRTL.test.tsx.snap | 360 ++- 2 files changed, 359 insertions(+), 2087 deletions(-) diff --git a/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap b/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap index b4d0f457c51249..99a3c59feaf5bb 100644 --- a/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap +++ b/packages/react-charting/src/components/StackedBarChart/__snapshots__/MultiStackedBarChart.test.tsx.snap @@ -36,8 +36,7 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on &:focus { outline: none; } -<<<<<<< HEAD - data-focuszone-id="FocusZone2" + data-focuszone-id="FocusZone5" onFocus={[Function]} onKeyDown={[Function]} onMouseDownCapture={[Function]} @@ -81,7 +80,7 @@ exports[`MultiStackedBarChart - mouse events Should render callout correctly on -
-
-
>>>>>> de73662bd4db7d730a3c256d7c900959100f3971 - data-focuszone-id="FocusZone5" - onFocus={[Function]} - onKeyDown={[Function]} - onMouseDownCapture={[Function]} - > -
-
- - Monitored - - -
-
- - 40 - - - / 63 - -
-
-
-
-
- - - - - - - - -
-
-
-
>>>>>> de73662bd4db7d730a3c256d7c900959100f3971 - data-focuszone-id="FocusZone5" + data-focuszone-id="FocusZone8" onFocus={[Function]} onKeyDown={[Function]} onMouseDownCapture={[Function]} @@ -1158,11 +943,11 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on data-is-focusable={false} role="text" > - Monitored + Unmonitored
@@ -1308,232 +1089,25 @@ exports[`MultiStackedBarChart - mouse events Should render customized callout on
-
-
-
- - Unmonitored - - -
-
- - 40 - - - / 63 - -
-
-
-
-
- - - - - - - - -
-
-
-
-
-
@@ -1820,12 +1394,7 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 x="0%" y={0} /> @@ -1854,14 +1423,8 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 y={0} /> @@ -2005,12 +1568,7 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 x="0%" y={0} /> @@ -2039,14 +1597,8 @@ exports[`MultiStackedBarChart snapShot testing Should not render bar labels in a >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 y={0} /> @@ -2283,1237 +1835,7 @@ exports[`MultiStackedBarChart snapShot testing Should render absolute-scale vari >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 - x="0%" - y={0} - /> - - - >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 - y={0} - /> - - - 63 - - -
-
-
- -
-
-
-
-
- - Unmonitored - - -
-
-
-
-
- - - >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 - x="0%" - y={0} - /> - - - >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 - y={0} - /> - - - 63 - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-`; - -exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart correctly 1`] = ` -
-<<<<<<< HEAD -
-
-
-
-
- - Monitored - - -
-
- - 40 - - - / 63 - -
-
-
-
-
- - - - - - - - -
-
-
-
-
-======= -
->>>>>>> de73662bd4db7d730a3c256d7c900959100f3971 -
-
-
-
- - Monitored - - -
-
- - 40 - - - / 63 - -
-
-
-
-
- - - - - - - - -
-
-
-
-
-
-
-
-
- - Unmonitored - - -
-
- - 40 - - - / 63 - -
-
-
-
-
- - - >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 - x="0%" - y={0} - /> - - - >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 - y={0} - /> - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-`; - -exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly 1`] = ` -
-
-
-
-
-
- - Monitored - - -
-
- - 40 - -
-
-
-
-
- - - >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 + width="61.002178649237464%" x="0%" y={0} /> @@ -3542,17 +1864,29 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 + width="35.07625272331154%" + x="63.002178649237464%" y={0} /> + + 63 +
@@ -3567,7 +1901,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly { display: flex; flex-direction: column; - margin-bottom: 10px; + margin-bottom: 16px; width: 100%; } > @@ -3577,7 +1911,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly &:focus { outline: none; } - data-focuszone-id="FocusZone55" + data-focuszone-id="FocusZone67" onFocus={[Function]} onKeyDown={[Function]} onMouseDownCapture={[Function]} @@ -3601,7 +1935,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly { color: #323130; display: block; - margin-bottom: 5px; + margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -3621,7 +1955,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly -
- - 40 - -
@@ -3723,10 +2039,9 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -3741,12 +2056,29 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly + + 63 +
@@ -3800,7 +2132,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly &:focus { outline: none; } - data-focuszone-id="FocusZone58" + data-focuszone-id="FocusZone70" onFocus={[Function]} onKeyDown={[Function]} onMouseDownCapture={[Function]} @@ -3829,7 +2161,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly
`; -exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] = ` +exports[`MultiStackedBarChart snapShot testing renders MultiStackedBarChart correctly 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
`; -exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = ` +exports[`MultiStackedBarChart snapShot testing renders hideDenominator correctly 1`] = `
+
+ + 40 + +
@@ -4424,10 +2833,9 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = { cursor: default; opacity: ; - stroke-width: 2px; - stroke: #ffffff; } &:focus { + outline-color: #000000; stroke-width: 2px; stroke: #000000; } @@ -4442,9 +2850,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = @@ -4472,7 +2879,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = &:focus { outline: none; } - data-focuszone-id="FocusZone43" + data-focuszone-id="FocusZone55" onFocus={[Function]} onKeyDown={[Function]} onMouseDownCapture={[Function]} @@ -4516,7 +2923,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] =
@@ -4567,7 +2964,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = &:focus { outline: none; } - data-focuszone-id="FocusZone45" + data-focuszone-id="FocusZone57" onFocus={[Function]} onKeyDown={[Function]} onMouseDownCapture={[Function]} @@ -4614,12 +3011,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 x="0%" y={0} /> @@ -4648,14 +3040,8 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = >>>>>> de73662bd4db7d730a3c256d7c900959100f3971 y={0} /> @@ -4712,8 +3098,7 @@ exports[`MultiStackedBarChart snapShot testing renders hideRatio correctly 1`] = &:focus { outline: none; } -<<<<<<< HEAD - data-focuszone-id="FocusZone43" + data-focuszone-id="FocusZone58" onFocus={[Function]} onKeyDown={[Function]} onMouseDownCapture={[Function]} @@ -4758,7 +3143,9 @@ exports[`MultiStackedBarChart snapShot testing renders hideLegend correctly 1`] } onMouseLeave={[Function]} > -
+
-
+