forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/drawer-motion
* master: (27 commits) feat: Add documentKeyboardEvent to OnVisibleChangeData when Tooltip is hidden via Escape (microsoft#28951) RFC: Component CSS Transitions/Animations on mount/unmount (microsoft#27328) 8.0 Azure Theme: Details list row focus contrast a11y bug fix (microsoft#28966) chore: update CODEOWNERS to some components to tag the current owner (microsoft#28949) fix(react-popover): Only apply modal attributes if the PopoverSurface traps focus (microsoft#28613) feat(react-table, react-components): export DataGridContextProvider (microsoft#28955) chore: decrease bundle size & adds fixtures (microsoft#28962) feat(react-utilities): create useAnimationFrame hook (microsoft#28948) fix(react-utilities): `useOnClickOutside` should consider text selection from inside to outside as inside click (microsoft#28765) docs(react-accordion): Added subcomponents to index story (microsoft#28956) applying package updates bugfix: ensure interop between assertSlots and old API (microsoft#28957) chore: rename imports from react-tree to react-components (microsoft#28946) applying package updates fix: Autofill queries the inputElement ownerDocument instead of document (microsoft#27312) Accordion : updated styles for accordion header cursor (microsoft#28850) Additional VR tests Charting Library (microsoft#28777) feat(react-motion): create react-motion-preview package scaffolding (microsoft#28947) chore: updates generator to use new slot API (microsoft#28916) chore: bumps version of esbuild-loader to v3.2.0 (microsoft#28878) ...
- Loading branch information
Showing
336 changed files
with
8,236 additions
and
1,081 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
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
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
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
87 changes: 87 additions & 0 deletions
87
apps/vr-tests/src/stories/react-charting/DonutChart.stories.tsx
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,87 @@ | ||
import * as React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { TestWrapperDecorator } from '../../utilities/TestWrapperDecorator'; | ||
import { Steps, StoryWright } from 'storywright'; | ||
import { IChartProps, IChartDataPoint, DonutChart } from '@fluentui/react-charting'; | ||
|
||
storiesOf('react-charting/DonutChart', module) | ||
.addDecorator((story, context) => TestWrapperDecorator(story, context)) | ||
.addDecorator((story, context) => { | ||
const steps = new Steps().snapshot('default', { cropTo: '.testWrapper' }).end(); | ||
return <StoryWright steps={steps}>{story()}</StoryWright>; | ||
}) | ||
.addStory( | ||
'Basic', | ||
() => { | ||
const points: IChartDataPoint[] = [ | ||
{ legend: 'first', data: 20000, color: '#DADADA', xAxisCalloutData: '2020/04/30' }, | ||
{ legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' }, | ||
]; | ||
|
||
const data: IChartProps = { | ||
chartTitle: 'Donut chart basic example', | ||
chartData: points, | ||
}; | ||
return ( | ||
<div style={{ padding: 10 }}> | ||
<DonutChart | ||
culture={window.navigator.language} | ||
data={data} | ||
innerRadius={55} | ||
href={'https://developer.microsoft.com/en-us/'} | ||
legendsOverflowText={'overflow Items'} | ||
hideLegend={false} | ||
height={220} | ||
width={176} | ||
valueInsideDonut={39000} | ||
/> | ||
</div> | ||
); | ||
}, | ||
{ includeDarkMode: true, includeRtl: true }, | ||
) | ||
.addStory( | ||
'Dynamic', | ||
() => { | ||
const data: IChartProps = { | ||
chartTitle: 'Donut chart dynamic example', | ||
chartData: [ | ||
{ | ||
legend: 'first', | ||
data: Math.floor(120), | ||
color: '#00bcf2', | ||
}, | ||
{ | ||
legend: 'second', | ||
data: Math.floor(130), | ||
color: '#b4a0ff', | ||
}, | ||
{ | ||
legend: 'third', | ||
data: Math.floor(10), | ||
color: '#fff100', | ||
}, | ||
{ | ||
legend: 'fourth', | ||
data: Math.floor(270), | ||
color: '#605e5c', | ||
}, | ||
], | ||
}; | ||
|
||
return ( | ||
<div style={{ padding: 10 }}> | ||
<DonutChart | ||
data={data} | ||
innerRadius={35} | ||
legendProps={{ | ||
allowFocusOnLegends: true, | ||
}} | ||
hideLabels={false} | ||
showLabelsInPercent={false} | ||
/> | ||
</div> | ||
); | ||
}, | ||
{ includeDarkMode: true, includeRtl: true }, | ||
); |
59 changes: 59 additions & 0 deletions
59
apps/vr-tests/src/stories/react-charting/GaugeChart.stories.tsx
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,59 @@ | ||
import * as React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { TestWrapperDecorator } from '../../utilities/TestWrapperDecorator'; | ||
import { Steps, StoryWright } from 'storywright'; | ||
import { DataVizPalette, GaugeChart, GaugeValueFormat } from '@fluentui/react-charting'; | ||
|
||
storiesOf('react-charting/GaugeChart', module) | ||
.addDecorator((story, context) => TestWrapperDecorator(story, context)) | ||
.addDecorator((story, context) => { | ||
const steps = new Steps().snapshot('default', { cropTo: '.testWrapper' }).end(); | ||
return <StoryWright steps={steps}>{story()}</StoryWright>; | ||
}) | ||
.addStory( | ||
'Basic', | ||
() => { | ||
return ( | ||
<div style={{ padding: '10px' }}> | ||
<GaugeChart | ||
width={252} | ||
height={128} | ||
segments={[ | ||
{ size: 33, color: DataVizPalette.success, legend: 'Low Risk' }, | ||
{ size: 34, color: DataVizPalette.warning, legend: 'Medium Risk' }, | ||
{ size: 33, color: DataVizPalette.error, legend: 'High Risk' }, | ||
]} | ||
chartValue={50} | ||
hideMinMax={false} | ||
/> | ||
</div> | ||
); | ||
}, | ||
{ includeDarkMode: true, includeRtl: true }, | ||
) | ||
.addStory( | ||
'Variant', | ||
() => { | ||
return ( | ||
<> | ||
<GaugeChart | ||
width={252} | ||
height={173} | ||
segments={[ | ||
{ size: 50, legend: 'Used' }, | ||
{ | ||
size: 100 - 50, | ||
color: DataVizPalette.disabled, | ||
legend: 'Available', | ||
}, | ||
]} | ||
chartValue={50} | ||
chartTitle="Storage capacity" | ||
sublabel="used" | ||
chartValueFormat={GaugeValueFormat.Fraction} | ||
/> | ||
</> | ||
); | ||
}, | ||
{ includeDarkMode: true, includeRtl: true }, | ||
); |
Oops, something went wrong.