AnsweredAssumed Answered

Problem with cccBulletChart in tables

Question asked by Sergey Khakhichev on Nov 13, 2017
Latest reply on Nov 16, 2017 by Sergey Khakhichev

Hello All.

I created dashboard with table component. Three columns of that table have following colTypes: circle, trendArrow and cccBulletChart. Then I added js into "Pre Execution" property in order to change default options of the colTypes.

My code is like this:

function f() {
        
    var optionsCircle = {
        includeValue: true,
        canvasSize: 20,
        radius: 10,
        color: function(st){
            if (st.colIdx == "3") {
                if (st.value <= "0") {
                    return "green";
                }
                else if ((st.value > "0") & (st.value <= "5")) {
                    return "yellow";
                }
                else return "red";
            }
        }
    };
    
    
    var optionsTrendArrow = {
        good: false,
        includeValue: true,
        valueFormat: function(v, st, opt) {
            var cssClass = ((v < 0) ? 'negative' : 'positive');
                //value = st.colFormat ? sprintf(st.colFormat,v) : v ;
                value = ((cssClass == "positive") ? ('+' + v + ' мес.') : (v + ' мес.'));
            
            return '<div class='+cssClass+'">'+value+'</div>';
        }
    };
    
    
    var optionsBulletChart = {  
        extensionPoints: {
            bulletMeasure_fillStyle: 'red',
            bulletMarker_shape: 'circle'
        }
            
    };
    
    this.setAddInOptions("colType", "circle", optionsCircle);
    this.setAddInOptions("colType", "trendArrow", optionsTrendArrow);
    this.setAddInOptions("colType", "cccBulletChart", optionsBulletChart);

 

And the problem is - the first two setAddInOptions are working pretty well, and the last one (cccBulletChart) is doing nothing. Marker shape and measure filling remain like defoults.

Could anybody tell me what am I doing wrong? My brain are boiling already.

Outcomes