Uploaded image for project: 'Community Dashboard Framework'
  1. Community Dashboard Framework
  2. CDF-992

Problem with cccBulletChart in tables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Medium
    • Resolution: Not a Bug
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None
    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Operating System/s:
      Windows 10
    • Steps to Reproduce:
      Hide
      1. Create dashboard
      2. Put table component on it
      3. Make one column type like cccBulletChart
      4. In "Pre execution" property change default options of the chart
      5. Make shure that option "RequireJS Support" is checked
      Show
      Create dashboard Put table component on it Make one column type like cccBulletChart In "Pre execution" property change default options of the chart Make shure that option "RequireJS Support" is checked

      Description

      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 defaults.

      If I uncheck option "RequireJS Support" everything is working just fine.
      So, probably problem is in RequireJS.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xoldmaster Sergey Khakhichev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: