Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I recently started learning Extensions building in Qliksense.
First I Tried to build a KPI with 1Measure with the custom properties under Measure.
I have clicked on Create New Object and selected "Chart visualization template"
Created .js file like below
Created .css file like below
.kpi
{
height:99%;
width:99%;
border:1px solid #ccc;
}
.kpi1_dim
{
height:50%;
width:100%;
}
By the above script I am able to apply the measure value but I am not getting KPI Measure title and Measure Properties also not applying. Can any one please help me to correct the above code
kpi += '<div class="kpi"><div class="kpi1_dim" style="title:'+layout.qHyperCube.qMeasureInfo["0"].title+';color:'+layout.qHyperCube.qMeasureInfo["0"].color+';bgcolor:'+layout.qHyperCube.qMeasureInfo["0"].bgcolor+';">'+hc.qMeasureInfo[k].qFallbackTitle+'</div><div>'+hc.qDataPages[0].qMatrix[0][k].qText+'</div>';
Thanks in advance.
Hi
It looks like you're writing the Title into the style attribute of the div.
style="title:' + layout.qHyperCube.qMeasureInfo["0"].title
Try moving it to within the div element.
<div> layout.qHyperCube.qMeasureInfo["0"].title </div>
I've changed your code below.
kpi += '<div class="kpi"><div class="kpi1_dim" style="color:' + layout.qHyperCube.qMeasureInfo["0"].color + ';bgcolor:' + layout.qHyperCube.qMeasureInfo["0"].bgcolor + ';">' + layout.qHyperCube.qMeasureInfo["0"].title + '</div><div>' + hc.qDataPages[0].qMatrix[0][k].qText + '</div>';
Hope that helps