Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

colours in charts

Hi

Were currently trying to assign colours to charts. I have read the blog 'Colors in charts', which explains how to do it but I'll admit havent got the technical know how to do this.

We have created a table and colours to bring through (attached) and the app were trying to bring this through on (also attached).

Really appreciate if someone could help us get this to come through.

Chris

4 Replies
israrkhan
Specialist II
Specialist II

your script need a bit modification, like mapping load , and reload, but i cant reload , dont have data files, if you could share i will do it for you, else, use Mapping load on your color excel file and applymap to your data table,

Like below:

ColorTable:

Mapping LOAD Activity,

    Rgb(Red,Green,Blue) as ActivityColor

FROM abc

Data:

LOAD daydate,

     [Time period],

     [staff name],

     Neighbourhood,

     Role,

     [Area Office],

     Region,

     [project title],

     taskname,

     [activity title],

     [Time (decimal hours)],

     [resource rate],

     [resource cost],

     [line manager],

     Location,

    [Activity type] As Activity,

ApplyMap('ColorTable',ActivityColor, Lightgrey()) as ActivityColor,

     comments

FROM abc

Hope it helps

mdmukramali
Specialist III
Specialist III

Dear ,

First link the Color table to the Joined Data table.

just rename the field Activity as [project title]  in the colors table.

then use the Background color for each expression where ever  using project title as dimension.

Kindly find the attachment.

I hope it will help u.

Thanks,

Mukram.

Not applicable
Author

Hi Isra, Mukram,

Tried both of these and still doesnt seem to work. I have copied script from your attachment but wont load. Doesn't like the ApplyMap statement (see attached)....

mdmukramali
Specialist III
Specialist III

Dear,

Just rename the Activity field name as [project title] in the color table.

so that link will be made between two tables.

then use the RGB(Red,Green,Blue) in the  Background Color Expression in all the charts which are having project title

as dimension.

Like below,

LOAD Activity  as [project title]

   Red,

    Green,

    Blue

FROM

(ooxml, embedded labels, table is Sheet1);

Thanks,

Mukram.