Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
Please share the way to include the color object to the properties panel in the custom extension. I'm trying to use the master dimension's color value in auto color mode. but couldn't find the proper way to integrate in the properties panel (like using qAttrExp).
Referred links:
Solved: Use master items COLORS in QSense Extension - Qlik Community - 1556421 - also please let me know how to get the colorMapRef value.
Hi @Manoj_Prabu , below an example of extension definition for enabling colors and legend. Then you can use it reading the layout object
definition: {
type: "items",
component: "accordion",
items: {
dimensions: {
uses: "dimensions",
min: 1,
max: 1
},
measures: {
uses: "measures",
min: 1,
max: 1
},
sorting: {
uses: "sorting"
},
settings: {
uses: "settings",
items: {
colorsAndLegend: {
uses: "colorsAndLegend",
items: {
legend: {
items: {
show: {
snapshot: {
tid: "property-legend"
}
}
}
}
}
}
}
}
}
}
Then you can use it reading the layout object
About how to get the colorMapRef value, what is your doubt? The link you posted it should help you on this topic
Hi @Manoj_Prabu , below an example of extension definition for enabling colors and legend. Then you can use it reading the layout object
definition: {
type: "items",
component: "accordion",
items: {
dimensions: {
uses: "dimensions",
min: 1,
max: 1
},
measures: {
uses: "measures",
min: 1,
max: 1
},
sorting: {
uses: "sorting"
},
settings: {
uses: "settings",
items: {
colorsAndLegend: {
uses: "colorsAndLegend",
items: {
legend: {
items: {
show: {
snapshot: {
tid: "property-legend"
}
}
}
}
}
}
}
}
}
}
Then you can use it reading the layout object
About how to get the colorMapRef value, what is your doubt? The link you posted it should help you on this topic
Hi @alex_colombo ,
Thank you for the response. Your solution literally saved most of my hours/days. This is what exactly that I expected.
About ColorMapRef, how to generate that ref id is my question. Once I added your solution, I got the ColorMapRef in the path - layout.qHyperCube.qDimensionInfo[0].qAttrDimInfo. but when I tried to get the layout as they said in the link, I didn't get the colors for the respective field. I'm expecting like - in the dimension "Year" for the field value "2022" it will return the master color value. Can you clarify my doubt regarding how to get those colors.
Apart from this question, I want to know how to use all the properties that used in Qlik sense default properties - like data as column instead of dimension & measure separately in the properties panel, like the one that you used above(colorsAndLegend). where to get the documentions for that?
Thanks & Regards,
Manoj Prabu
Hi @Manoj_Prabu for your first question, if you are using default colors (no custom colors set), you have to use Theme API for understading which color will have you first/second/third/etc. dimension.
About all native properties, unfortunatley this is not documented