@@ -22,10 +22,10 @@ const App: React.FC = () => {
2222 const [ value , setValue ] = React . useState ( getSelection ( "Theme" , "Light" ) ) ;
2323 const [ isRTL , setisRTL ] = React . useState ( getSelection ( "RTL" , "false" ) === "true" ) ;
2424 const [ isWidthSet , setisWidthSet ] = React . useState ( getSelection ( "WidthSet" , "true" ) === "true" ) ;
25- const [ isV8ChartVisible , setIsV8ChartVisible ] = React . useState ( getSelection ( "V8ChartVisible " , "false" ) === "true" ) ;
25+ const [ isReversedOrder , setIsV9ChartFirst ] = React . useState ( getSelection ( "isV9ChartFirst " , "false" ) === "true" ) ;
2626 const [ labelRTLMode , setLabelRTLMode ] = React . useState ( "Enable RTL" ) ;
2727 const [ labelWidthSwitch , setLabelWidthSwitch ] = React . useState ( "Disable Width slider" ) ;
28- const [ labelV8ChartSwitch , setLabelV8ChartSwitch ] = React . useState ( "Reverse Chart Order" ) ;
28+ const [ labelV8ChartSwitch ] = React . useState ( "Mean the Chart Order" ) ;
2929 const [ chartWidth , setChartWidth ] = React . useState < number > ( Number ( getSelection ( "ChartWidth" , window . innerWidth . toString ( ) ) ) ) ;
3030
3131 setRTL ( isRTL ) ;
@@ -49,11 +49,10 @@ const App: React.FC = () => {
4949 saveSelection ( "WidthSet" , newIsWidthSet . toString ( ) ) ;
5050 } ;
5151
52- const handleV8ChartSwitchChange = ( ) => {
53- const newIsV8ChartVisible = ! isV8ChartVisible ;
54- setIsV8ChartVisible ( newIsV8ChartVisible ) ;
55- setLabelV8ChartSwitch ( "Reverse Chart Order" ) ;
56- saveSelection ( "V8ChartVisible" , newIsV8ChartVisible . toString ( ) ) ;
52+ const handleChartOrderSwitchChange = ( ) => {
53+ const newIsV9ChartFirst = ! isReversedOrder ;
54+ setIsV9ChartFirst ( newIsV9ChartFirst ) ;
55+ saveSelection ( "isV9ChartFirst" , newIsV9ChartFirst . toString ( ) ) ;
5756 } ;
5857
5958 const handleSliderChange = ( event : React . ChangeEvent < HTMLInputElement > , data : SliderOnChangeData ) => {
@@ -86,8 +85,8 @@ const App: React.FC = () => {
8685 label = { labelWidthSwitch }
8786 />
8887 < Switch
89- checked = { isV8ChartVisible }
90- onChange = { handleV8ChartSwitchChange }
88+ checked = { isReversedOrder }
89+ onChange = { handleChartOrderSwitchChange }
9190 label = { labelV8ChartSwitch }
9291 />
9392 < Body2 > @fluentui/react-charting </ Body2 > < Subtitle2 > v5.25.2</ Subtitle2 >
@@ -103,7 +102,7 @@ const App: React.FC = () => {
103102 /> </ > ) }
104103 < ChartWrapper
105104 width = { isWidthSet ? chartWidth : undefined }
106- isReversedOrder = { isV8ChartVisible }
105+ isReversedOrder = { isReversedOrder }
107106 />
108107 </ PortalCompatProvider >
109108 </ FluentProvider >
0 commit comments