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

Barchart column background color

Open duycoder opened this issue 8 years ago • 1 comments
trafficstars

I want to have a barchart with 4 columns with 4 diffirent colors. But when i setting the pallet like this:

<Bar data={item.statistics} options={options} accessorKey='v' pallete={[ { 'r': 125, 'g': 193, 'b': 8 }, { 'r': 255, 'g': 102, 'b': 0 }, { 'r': 255, 'g': 15, 'b': 0 }, { 'r': 191, 'g': 195, 'b': 186 } ]} />

  • I go the result: x1
  • The first and the last column had the same color. Anyone know how to fix this ?

duycoder avatar Sep 05 '17 04:09 duycoder

Apparently it's hardcoded to cycle through 3 colors max for bar charts: https://github.com/rsamec/react-pathjs-chart/blob/95b56505e43c92eca1e7750b4070fac96358d7f0/src/charts/Bar.js#L83

Ideally that would be configurable.

zaach avatar Sep 14 '17 02:09 zaach