wuxudong / react-native-charts-wrapper

a react native charts wrapper (support android & iOS)
2.43k stars 657 forks source link

PieChart does not support extraOffsets,it‘s not use on PieChart,how can i control PieChart’s size? #933

Open ducorizon opened 1 year ago

ducorizon commented 1 year ago

I can't control the size of the pie chart by setting extraOffsets,its seems not supported on PieChart

<PieChart style={styles.chart} logEnabled={false} chartBackgroundColor={processColor('#272F40')} chartDescription={this.state.description} data={this.state.data} legend={this.state.legend}

                    highlights={this.state.highlights}

                    **extraOffsets={{ left: 50, top: 0, right: 0, bottom:0 }}**

                    entryLabelColor={processColor('#fff')}
                    entryLabelTextSize={20}
                    entryLabelFontFamily={'HelveticaNeue-Medium'}
                    drawEntryLabels={true}                   

                    rotationEnabled={false}      
                    rotationAngle={45}          
                    usePercentValues={true}
                    styledCenterText={{ text: 'Pie center text!', color: processColor('pink'), fontFamily: 'HelveticaNeue-Medium', size: 20 }}
                    centerTextRadiusPercent={100}   
                    holeRadius={60}                 
                    holeColor={processColor('#272F40')}  
                    transparentCircleRadius={50}
                    transparentCircleColor={processColor('#f0f0f088')}
                    maxAngle={365}            
                    //animation={{ durationY: 200 }}
                    onSelect={this.handleSelect.bind(this)}
                    onChange={(event) => console.log(event.nativeEvent)}
                />

Specifications