Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Partner
Partner

Use master items COLORS in QSense Extension

Hi all,

Is there an API to get the colors of a master item in a QS extension?

I've noticed that layout.qHyperCube.qDimensionInfo[0].coloring.colorMapRef contains an ID of a ColorMap in case of master items.

How can I get this ColorMap?

Thanks

1 Solution

Accepted Solutions
Employee
Employee

Re: Use master items COLORS in QSense Extension

Hi,

The master dimension colors are stored in a separate generic object called ColorMapModel_<colorMapRef>, to get those values you would need to get the object and then its layout:

 

app.getObject('ColorMapModel_abcdef').then(model => model.getLayout().then(layout => console.log(layout)));
1 Reply
Employee
Employee

Re: Use master items COLORS in QSense Extension

Hi,

The master dimension colors are stored in a separate generic object called ColorMapModel_<colorMapRef>, to get those values you would need to get the object and then its layout:

 

app.getObject('ColorMapModel_abcdef').then(model => model.getLayout().then(layout => console.log(layout)));