Closed ragrawal closed 10 years ago
I do not think this is working, at least with anything else than pieChart. Actually, color_list has to be passed to extra_serie, not to extra. And even then, it does not work for lineChart. I will see if I can provide some patch for this.
However, there is a quick fix: in extra (not extra_serie), pass 'color_category':'category10' (or 20b, 20c, default is 20) to change the palette. This way, there is a better disctinction for lineCharts with only 2 or 3 series. The default (category20) works nicely for lineCharts with more than 6-8 series.
There is also another way to make this work now that I have implemented the chart_attr attribute in extra: you may use now in extra: 'chart_attr': {'color':color_list,},
and declare your color_list somewhere in your code, e.g. color_list = ['orange', 'yellow', '#C5E946', '#95b43f', 'red', '#FF2259', '#F6A641']
This will override 'color_category' you may pass in extra.
Please check this fix, it seems to work nicely for me: https://github.com/areski/django-nvd3/commit/3ce948794aab69d0c848b84feaa0f969ba6b696e
Hey is it possible to get a similar example for discrete bar charts or multi-barcharts
I am not sure if pip is not finding a version to upgrade to, but my version installed is django-nvd3==0.6.0 and I am still having troubles changing the color of my lines. http://stackoverflow.com/questions/23202088/django-nvd3-cannot-change-line-color
Hi. Great work on creating this project. I was able to quickly get all my graphs generate. However I am not able to determine two things
Thanks. Looking forward for a solution. Ritesh