capitalone / react-native-pathjs-charts

Android and iOS charts based on react-native-svg and paths-js
Apache License 2.0
879 stars 261 forks source link

Pie Chart is not in the center #233

Open VanessaChu opened 6 years ago

VanessaChu commented 6 years ago

The Pie Chart is not being drawn in the center. It's not reacting the styles applied in View, instead it's positioned in the top left.

screen shot 2018-02-21 at 4 41 30 pm

      <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
        <Pie data={data}
          options={options}
          accessorKey='population'
          margin={{top: 20, left: 20, right: 20, bottom: 20}}
          color='#774B97'
          pallete={
            [
              {'r': 123, 'g': 94, 'b': 144},
              {'r': 156, 'g': 142, 'b': 166},
              {'r': 89, 'g': 73, 'b': 101},
              {'r': 119, 'g': 75, 'b': 151}
            ]
          }
          />
      </View>