Closed xwz1116 closed 7 years ago
Better documentation would help here but you want to use the pallete
property to specify the colors you want to use. For example, I tweaked the "Bar (Column) - Basic" chart in the example app so that it looks like this:
I did this by adding data values for new columns named "orange" and "pear" and then I added the palette property to the Bar component like so:
<View style={styles.container}>
<Bar
data={data} options={options} accessorKey='v'
pallete={
[
{'r':25,'g':99,'b':201},
{'r':24,'g':175,'b':35},
{'r':190,'g':31,'b':69},
{'r':100,'g':36,'b':199},
{'r':214,'g':207,'b':32},
{'r':198,'g':84,'b':45}
]
}
/>
</View>
Does that help?
oh,thank you very much,i get t.
I want to show five colors in my Bar chart,but only show three colors,