Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to give custome color property for background color to perticular dimention .
but I dont know how to given it .can you guys please help me to solve this problem ?
here is my javascript code for
define( ["qlik","jquery", "text!./style.css", "text!./template.html"], function (qlik, $, cssContent, template ) {'use strict';
$("<style>").html(cssContent).appendTo("head");
return {
template: template,
initialProperties : {
qHyperCubeDef : {
qDimensions : [],
qMeasures : [],
qInitialDataFetch : [{
qWidth : 10,
qHeight : 50
}]
}
},
definition : {
type : "items",
component : "accordion",
items : {
dimensions : {
uses : "dimensions",
min : 1,
items:{
colorExpression:{
type: "string",
label: "Enter color expression",
component: 'expression',
ref:"qHyperCubeDef.qDimensionsInfo.0.qAttributeExpressions.0.qExpression",
expression: "optional"
}
}
},
measures : {
uses : "measures",
min : 0
},
sorting : {
uses : "sorting"
},
settings : {
uses : "settings",
items : {
initFetchRows : {
ref : "qHyperCubeDef.qInitialDataFetch.0.qHeight",
label : "Initial fetch rows",
type : "number",
defaultValue : 50
}
}
}
}
},
support : {
snapshot: true,
export: true,
exportData : true
},
paint: function ( ) {
//setup scope.table
if ( !this.$scope.table ) {
this.$scope.table = qlik.table( this );
}
return qlik.Promise.resolve();
},
};
} );
Just a quick question. Are you talking about themes or can you accept the "color master items" ?
No sir
I dont want to use color master item
I need a code for developing custome color property for dimentions
you can use
qAttributeExpressions.0.qExpression
instead of
qHyperCubeDef.qDimensionsInfo.0.qAttributeExpressions.0.qExpression
items:{
colorExpression:{
type: "string",
label: "Enter color expression",
component: 'expression',
ref:"qAttributeExpressions.0.qExpression",
expression: "optional"
}
}
},