Skip to content

Commit ded9dfe

Browse files
Copilotsrmukher
andcommitted
Remove commented code and revert non-GroupedVerticalBarChart snapshot changes
Co-authored-by: srmukher <120183316+srmukher@users.noreply.github.com>
1 parent 7e98bcd commit ded9dfe

File tree

9 files changed

+2956
-1061
lines changed

9 files changed

+2956
-1061
lines changed

packages/charts/react-charts/library/src/components/AreaChart/__snapshots__/AreaChart.test.tsx.snap

Lines changed: 538 additions & 279 deletions
Large diffs are not rendered by default.

packages/charts/react-charts/library/src/components/DonutChart/__snapshots__/DonutChart.test.tsx.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ Object {
318318
class="fui-donut-arc__root"
319319
d="M0.55,-54.997A55,55,0,0,1,51.396,-19.582L0,0Z"
320320
data-is-focusable="true"
321-
id="_Pie_r0first20000"
321+
id="_Pie_r1lfirst20000"
322322
opacity="1"
323323
role="img"
324324
style="fill: #E5E5E5; cursor: default;"
@@ -331,7 +331,7 @@ Object {
331331
class="fui-donut-arc__root"
332332
d="M51.777,-18.551A55,55,0,0,1,-22.37,50.245L0,0Z"
333333
data-is-focusable="true"
334-
id="_Pie_r0second39000"
334+
id="_Pie_r1lsecond39000"
335335
opacity="1"
336336
role="img"
337337
style="fill: #0078D4; cursor: default;"
@@ -344,7 +344,7 @@ Object {
344344
class="fui-donut-arc__root"
345345
d="M-23.37,49.788A55,55,0,0,1,-0.55,-54.997L0,0Z"
346346
data-is-focusable="true"
347-
id="_Pie_r0third45000"
347+
id="_Pie_r1lthird45000"
348348
opacity="1"
349349
role="img"
350350
style="fill: #DADADA; cursor: default;"
@@ -356,7 +356,7 @@ Object {
356356
</div>
357357
<div
358358
class="fui-cart__calloutContainer"
359-
id="calloutr1"
359+
id="calloutr1m"
360360
>
361361
<div
362362
class="fui-PopoverSurface"
@@ -499,7 +499,7 @@ Object {
499499
class="fui-donut-arc__root"
500500
d="M0.55,-54.997A55,55,0,0,1,51.396,-19.582L0,0Z"
501501
data-is-focusable="true"
502-
id="_Pie_r0first20000"
502+
id="_Pie_r1lfirst20000"
503503
opacity="1"
504504
role="img"
505505
style="fill: #E5E5E5; cursor: default;"
@@ -512,7 +512,7 @@ Object {
512512
class="fui-donut-arc__root"
513513
d="M51.777,-18.551A55,55,0,0,1,-22.37,50.245L0,0Z"
514514
data-is-focusable="true"
515-
id="_Pie_r0second39000"
515+
id="_Pie_r1lsecond39000"
516516
opacity="1"
517517
role="img"
518518
style="fill: #0078D4; cursor: default;"
@@ -525,7 +525,7 @@ Object {
525525
class="fui-donut-arc__root"
526526
d="M-23.37,49.788A55,55,0,0,1,-0.55,-54.997L0,0Z"
527527
data-is-focusable="true"
528-
id="_Pie_r0third45000"
528+
id="_Pie_r1lthird45000"
529529
opacity="1"
530530
role="img"
531531
style="fill: #DADADA; cursor: default;"
@@ -537,7 +537,7 @@ Object {
537537
</div>
538538
<div
539539
class="fui-cart__calloutContainer"
540-
id="calloutr1"
540+
id="calloutr1m"
541541
>
542542
<div
543543
class="fui-PopoverSurface"

packages/charts/react-charts/library/src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ describe('Grouped vertical bar chart - Subcomponent Legends', () => {
445445
GroupedVerticalBarChart,
446446
{ data: chartPoints },
447447
container => {
448-
//const legends = getByClass(container, /legend-/i);
449448
const legends = screen.getAllByText((content, element) => element!.tagName.toLowerCase() === 'button');
450449
fireEvent.mouseOver(legends[0]);
451450
const bars = screen.getAllByText((content, element) => element!.tagName.toLowerCase() === 'rect');

packages/charts/react-charts/library/src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@ import {
3333
CartesianChart,
3434
Margins,
3535
Legend,
36-
// RefArrayData,
3736
GroupedVerticalBarChartProps,
3837
GroupedVerticalBarChartData,
3938
GVBarChartSeriesPoint,
4039
Legends,
4140
YValueHover,
42-
// DataVizPalette,
43-
// getColorFromToken,
4441
ChartPopoverProps,
4542
Chart,
4643
} from '../../index';
@@ -80,7 +77,6 @@ export const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = R
8077
let _datasetForBars: any[] = [];
8178
let _margins: Margins = { top: 0, right: 0, bottom: 0, left: 0 };
8279
let _groupedVerticalBarGraph: JSX.Element[] = [];
83-
// let _refArray: RefArrayData[] = [];
8480
let _yMax: number = 0;
8581
let _calloutAnchorPoint: GVBarChartSeriesPoint | null = null;
8682
let _barWidth: number = 0;
@@ -89,7 +85,6 @@ export const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = R
8985
let _xAxisOuterPadding: number = 0;
9086
let _legendColorMap: Record<string, [string, string]> = {};
9187
const cartesianChartRef = React.useRef<Chart>(null);
92-
// const Y_ORIGIN: number = 0;
9388

9489
const [color, setColor] = React.useState<string>('');
9590
const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);
@@ -391,7 +386,6 @@ export const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = R
391386
};
392387

393388
const _onBarLeave = (): void => {
394-
/**/
395389
};
396390

397391
const _handleChartMouseLeave = (): void => {

0 commit comments

Comments
 (0)