Changing the default series colors for charts

Answered
Vesa Tähkävuori asked on April 25, 2018

Hi,
we are a paying customer that will be releasing a new product this fall that utilizes Flexmonster as one of its core libraries. We would like to change the default colors that are used in the charts sections (I believe it uses Highcharts internally).

Thanks for any help.

Regards, Vesa Tähkävuori

6 answers

Public
Vesa Tähkävuori April 25, 2018

Here's a screenshot that shows the colors that I'm talking about.

Public
Tanya Gryshko Tanya Gryshko Flexmonster April 25, 2018

Hello, Vesa,
You can change default colors for charts via CSS styles.
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.
Does it work for your case?
Regards,
Tanya

Public
Vesa Tähkävuori April 26, 2018

Hi, I tried it but for some reason it only seems to apply the first one of the colors. Any idea what could be the reason?

Public
Vesa Tähkävuori April 26, 2018

Here's the screenshot.

Public
Vesa Tähkävuori April 26, 2018

Sorry, this my was my bad. There was a problem with the test pivot defition. The colors are working, thank you.

Public
Tanya Gryshko Tanya Gryshko Flexmonster April 26, 2018

Hello, Vesa,
Glad to hear it works now.
Please let us know if you have any other questions.
Regards,
Tanya

Please login or Register to Submit Answer