I'm trying to create specific colors for certain values/slices, but can't find much documentation on it. I know it's possible for bar charts and such, even pie charts in Javascript, and one of their examples has a colors option, but modifying it does nothing for me.
This is what I have:
pie_chart = {
'data':
[
{ 'labels': ['V0', 'V1', 'V2', 'V3', 'V4', 'V5', 'V6', 'V7', 'V8', 'V9'],
'values': [v0, v1, v2, v3, v4, v5, v6, v7, v8, v9],
'marker': {'colors': [
'rgb(0, 204, 0)', # Green
'rgb(255, 255, 0)', # Yellow
'rgb(118, 17, 195)', # Purple
'rgb(0, 48, 240)' # Blue
'rgb(240, 88, 0)' # Orange
'rgb(215, 11, 11)' # Red
'rgb(11, 133, 215)' # Light Blue
'rgb(0, 0, 0)' # Black
'rgb(0, 0, 0)'
'rgb(0, 0, 0)'
]
},
'type': 'pie',
'name': "Gym grades",
'hoverinfo':'label+percent+name',
'textinfo':'none'
}
],
'layout': {'title': 'Grades in gym'}
}
url = py.plot(pie_chart, validate=False, filename='Gym Grades')
Problem: colors aren't changing ('marker' has no effect)
Question: is there a different way I'm supposed to modify the colors