@@ -14,7 +14,6 @@ const NeoSunburstChart = (props: ChartProps) => {
1414 }
1515 const records = props . records ;
1616 const selection = props . selection ;
17- const [ data , setData ] = useState ( undefined ) ;
1817 useEffect ( ( ) => {
1918 setData ( commonProperties . data ) ;
2019 } , [ props . selection ] ) ;
@@ -32,10 +31,15 @@ const NeoSunburstChart = (props: ChartProps) => {
3231 // Where a user give us just the tree starting one hop away from the root.
3332 // as Nivo needs a common root, so in that case, we create it for them.
3433 const commonProperties = { data : dataPre . length == 1 ? dataPre [ 0 ] : { name : "Total" , children : dataPre } } ;
34+
35+ const [ data , setData ] = useState ( commonProperties . data ) ;
36+
3537 if ( data == undefined ) {
3638 setData ( commonProperties . data ) ;
3739 }
3840
41+
42+ const [ back , setBack ] = useState ( false ) ;
3943 const settings = ( props . settings ) ? props . settings : { } ;
4044 const legendHeight = 20 ;
4145 const marginRight = ( settings [ "marginRight" ] ) ? settings [ "marginRight" ] : 24 ;
@@ -45,10 +49,11 @@ const NeoSunburstChart = (props: ChartProps) => {
4549 const enableArcLabels = ( settings [ "enableArcLabels" ] !== undefined ) ? settings [ "enableArcLabels" ] : true ;
4650 const interactive = ( settings [ "interactive" ] ) ? settings [ "interactive" ] : true ;
4751 const borderWidth = ( settings [ "borderWidth" ] ) ? settings [ "borderWidth" ] : 0 ;
48- const legend = ( settings [ "legend" ] ) ? settings [ "legend" ] : false ;
52+ const legend = ( settings [ "legend" ] !== undefined ) ? settings [ "legend" ] : false ;
4953 const arcLabelsSkipAngle = ( settings [ "arcLabelsSkipAngle" ] ) ? settings [ "arcLabelsSkipAngle" ] : 10 ;
5054 const cornerRadius = ( settings [ "cornerRadius" ] ) ? settings [ "cornerRadius" ] : 3 ;
5155 const colorScheme = ( settings [ "colors" ] ) ? settings [ "colors" ] : 'nivo' ;
56+ const inheritColorFromParent = ( settings [ "inheritColorFromParent" ] !== undefined ) ? settings [ "inheritColorFromParent" ] : true ;
5257
5358 if ( ! data || ! data . children || data . children . length == 0 ) {
5459 return < NoDrawableDataErrorMessage /> ;
@@ -80,6 +85,7 @@ const NeoSunburstChart = (props: ChartProps) => {
8085 enableArcLabels = { enableArcLabels }
8186 borderWidth = { borderWidth }
8287 cornerRadius = { cornerRadius }
88+ inheritColorFromParent = { inheritColorFromParent }
8389 margin = { {
8490 top : marginTop ,
8591 right : marginRight ,
0 commit comments