RazorFlow / framework

The RazorFlow Dashboard Framework
MIT License
133 stars 44 forks source link

(PHP version) Piechart unable to config series color. #9

Open sospixs opened 9 years ago

sospixs commented 9 years ago

Some chart will necessary to config series color. Because user has learn about color we communicated as usual.

Example we have pie chart to show active customer by active type.

Series 1 : Stay customer -->show "blue" Series 2 : Comeback customer -->show "yellow" Series 3 : New customer -->show "green"

Please add this feature to next version. Is that possible on PHP version?

skyronic commented 9 years ago

This looks like a useful feature. We'll definitely be able to work on it.

@AmeenAhmed will you be able to add this if you have time from the other previous tasks next week?

skyronic commented 9 years ago

@AmeenAhmed implement the following API please, or work with @narendrashetty or @swaroopsm to get this done.

We can use this API:

PHP

$chart->setPieSeriesColors (array("#abcdef", "#abcdef", "#abcdef"));

JS:

chart.setPieSeriesColors (["#abcdef",  "#abcdef", "#abcdef"]);

We will have to take the following steps:

  1. Add a new column called "pieSeriesColors" (along with labels) to the datasource.
  2. Add a new option in the chart properties for custom pie series colors, add this to props.json
  3. If this flag is set, make sure to look for this additional column in the renderer
  4. Pass the set of colors to the pie chart system in RazorCharts
hasnain03ali commented 9 years ago

how to use Doughnut Chart in razor flow kindly reply me fast (email id: hasnain03ali@gmail.com)