react-native-pathjs-charts icon indicating copy to clipboard operation
react-native-pathjs-charts copied to clipboard

Pie Chart is not in the center

Open VanessaChu opened this issue 7 years ago • 0 comments
trafficstars

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>

VanessaChu avatar Feb 22 '18 00:02 VanessaChu