#1 2019-06-13 14:19:34

razvan.bunea
Member
Registered: 2019-06-13

Not possible to change chart colours in Saiku / Pivot reports

Hi,

First of all congrats for a great tool. My question is if there's any way to change the colours of Saiku / Pivot charts, as the defaults are rather bland and limited. I saw the same question pop up a couple of more times on the forums, but the solution offered there, that is tempering with the SaikuChartRender.js file did not work for me. I found 3 SaikuChartRender.js files at the following locations under Tomcat's webapps folder:

1. reportserver/resources/saiku/js/saiku/render
2. reportserver/WEB-INF/classes/resources/saiku/SaikuChartRenderer.js
3. reportserver/WEB-INF/classes/resources/saiku/render/SaikuChartRenderer.js (minified)

I changed all of them and cleared my browser cache, even restarted Tomcat and nothing changed. I also used a colour picker to get the hex codes of current chart colours and they don't appear anywhere in those files or in any other files of ReportServer. I also tried using <CalculatedMemberProperty> with a specific colour format in my cube definitions and that only applies when you look at the report in it's tabular form, but not to charts. Then I checked the Saiku Analytics site and saw that they offer colour changing of charts only in the Enterprise Edition. And I assume that ReportServer uses the Community Edition of the Saiku engine. So maybe they have hardcoded somehow the colours in their Community Edition..

We like ReportServer a lot and we think of purchasing the Enterprise Edition, however not being able to customise the colours of charts, especially Pie charts, is kind of a show stopper for us as there is way to much red on the screen (usually associated with business risks) for the corporate data we display. So, is there any workaround for this situation? I really hope so...

Offline

#2 2019-06-14 10:02:28

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Not possible to change chart colours in Saiku / Pivot reports

Hi razvan.bunea,

thanks for your interest in ReportServer and the detailed description of your approaches.

We will look into this and will update here when we have more information. I raised ticket RS-3513 for this.

Regards,
Eduardo

Offline

#3 2019-06-14 11:56:01

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Not possible to change chart colours in Saiku / Pivot reports

Hi razvan.bunea,

if you change the following in all three files:
1. reportserver/resources/saiku/js/saiku/render/SaikuChartRenderer.js
2. reportserver/WEB-INF/classes/resources/saiku/SaikuChartRenderer.js
3. reportserver/WEB-INF/classes/resources/saiku/render/SaikuChartRenderer.js

options.colors = ['#AE1717', '#AE5B17', '#0E6868'];  ---->  options.colors = ['#172ab7', '#17b72e', '#c3f458'];

You get, after a complete browser cache and temp files deletion, the following chart:

Bildschirmfoto-2019-06-14-um-13-52-35.png

You are right, we use Saiku CE. The difference with Saiku EE is that the colors may be changed *per chart* in Saiku EE.

Nevertheless, the settings I describe should allow you to create a color theme that fits your enterprise theme.

Regards,
Eduardo

Offline

#4 2019-06-14 12:01:07

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Not possible to change chart colours in Saiku / Pivot reports

Hi razvan.bunea,

please confirm this works for you.

Regards,
Eduardo

Offline

#5 2019-06-14 12:44:22

razvan.bunea
Member
Registered: 2019-06-13

Re: Not possible to change chart colours in Saiku / Pivot reports

Hi Eduardo,

Thanks for your quick response. It worked perfectly! Actually I think the first file is the one that matters. I was changing the colours in the actual definitions of the charts, that is in the:


// Default static style-sheet
SaikuChartRenderer.prototype.cccOptionsDefault

function and I didn't realise that they where overridden further down in the:


SaikuChartRenderer.prototype.getQuickOptions

function by that options.colors definition you pointed to.

I think this is very useful to know for everyone else, so maybe it deserves an entry in the 'Saiku reports' section of your 'Administration guide'. Many thanks for your help and keep up the great work on this very nice product!

Offline

#6 2022-11-08 16:25:15

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Not possible to change chart colours in Saiku / Pivot reports

Hi razvan.bunea,

pls note that the colors will probably be easily configurable in the next RS 4.4.0 version via configuration file. This will be available for the Enterprise editions of ReportServer.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB