Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: cccBulletChart inside of Table component.

  1. #1
    Join Date
    Sep 2017
    Posts
    3

    Unhappy cccBulletChart inside of Table component.

    Hello to everybody.

    I created the Table component. One of columns has cccBulletChart type. Everything is fine exept of colors. I need to change colors of ranges and measures.

    What did I try to do?

    In preExecution tried to put two diffrent codes:
    Code:
    // First code
    
    function f() {
       var options = {
          extensionPoints: {
             "bulletMarker_shape": "Bar",
             "bulletMeasure_fillStyle": "green"
             "bulletRange_fillStyle": function(){return ["#9C9384","#DED2A0","#F2EED5","#FEFDF9"][this.index];}
          }
       };
       this.setAddInOptions("colType", "cccBulletChart", options);
    }
    Code:
    // Second code
    
    function f() {
       var options = {
             bulletMarker_shape: "Bar",
             bulletMeasure_fillStyle: "green"
             bulletRange_fillStyle: function(){return ["#9C9384","#DED2A0","#F2EED5","#FEFDF9"][this.index];}
       };
       this.setAddInOptions("colType", "cccBulletChart", options);
    }
    Neither one of them is working. Colors are still grey.

    What am I doing wrong?

  2. #2

    Default Type of component

    Hi,

    I have the same issue. I don't have the solution for now, but I know what is happening.

    This issue occurs only if RequireJS is enabled.

    I have used Google Chrome javascript debuuger and here is what I have seen :
    When using this.setAddInOptions, "this" refers to an object of type "tableComponent", not "cccBulletChart".
    That is the reason why the options are not applied on the bullet chart.
    I am looking for a property to target the bullet chart specifically.

    When running the dashboard without requireJS, "this" refers to an object of type "Table", and setAddInOptions is working.

    I will let you know as soon as I find the solution.

    Quote Originally Posted by xoldmaster View Post
    Hello to everybody.

    I created the Table component. One of columns has cccBulletChart type. Everything is fine exept of colors. I need to change colors of ranges and measures.

    What did I try to do?

    In preExecution tried to put two diffrent codes:
    Code:
    // First code
    
    function f() {
       var options = {
          extensionPoints: {
             "bulletMarker_shape": "Bar",
             "bulletMeasure_fillStyle": "green"
             "bulletRange_fillStyle": function(){return ["#9C9384","#DED2A0","#F2EED5","#FEFDF9"][this.index];}
          }
       };
       this.setAddInOptions("colType", "cccBulletChart", options);
    }
    Code:
    // Second code
    
    function f() {
       var options = {
             bulletMarker_shape: "Bar",
             bulletMeasure_fillStyle: "green"
             bulletRange_fillStyle: function(){return ["#9C9384","#DED2A0","#F2EED5","#FEFDF9"][this.index];}
       };
       this.setAddInOptions("colType", "cccBulletChart", options);
    }
    Neither one of them is working. Colors are still grey.

    What am I doing wrong?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.