-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix clicking inside chart popovers when rendered inside tabs (#1839
- Loading branch information
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import React from 'react'; | ||
|
||
import Box from '~components/box'; | ||
|
||
import { barChartInstructions, commonProps, data3 } from './common'; | ||
import { BarChart, Tabs } from '~components'; | ||
|
||
export default function () { | ||
return ( | ||
<Box margin="m"> | ||
<h1>Mixed chart integration test</h1> | ||
<Tabs | ||
tabs={[{ id: 'chart', label: 'Chart', content: <Chart /> }]} | ||
i18nStrings={{ scrollLeftAriaLabel: 'Scroll left', scrollRightAriaLabel: 'Scroll right' }} | ||
/> | ||
</Box> | ||
); | ||
} | ||
|
||
function Chart() { | ||
return ( | ||
<BarChart | ||
{...commonProps} | ||
id="chart" | ||
height={250} | ||
series={[{ title: 'Calories', type: 'bar', data: data3 }]} | ||
xDomain={['Potatoes', 'Tangerines', 'Chocolate', 'Apples', 'Oranges']} | ||
yDomain={[0, 700]} | ||
xTitle="Food" | ||
yTitle="Calories (kcal)" | ||
xScaleType="categorical" | ||
ariaLabel="Bar chart" | ||
ariaDescription={barChartInstructions} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters