Download Free Trial

How to assign colors to Bar and Column charts?


I need assign custom colors to Bar and Column charts
How can I do that?
Thank you

3 answers

Tanya Gryshko Flexmonster October 27, 2017

Hello, Ralys,
Thank you for writing.
Please check out this example on JSFiddle. We use .fm-charts-color-n to set the color for the n-th chart sector. In this sample, we have specified six colors. The seventh sector is specified with fill: none. This trick is used for repeating custom colors in case there are more than six chart sectors. If the seventh sector was not specified, Flexmonster would use its own colors.
Let me know if the above approach was helpful.

Ralys October 29, 2017

With Pie chart it working
With Bar and Column all bars are colored from .fm-charts-color-1
The .fm-charts-color-2 …n not working
What I am doing wrong?

Dmytro Zvazhii Flexmonster October 31, 2017

Hello Ralys,
Please check the following example – As you can see, the main difference is that in the first instance the Country field is set for columns but in the second instance it is located in rows. For pie charts pivot uses fields from rows to draw the legend. When it comes to bar and column charts the legend will be drawn from the fields located in columns.
Please let us know if you have any additional questions.

Please login or Register to Submit Answer