Announcement

Collapse
No announcement yet.

Hiding the data coloring section

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hiding the data coloring section

    I created a custom report. Some of the data in the list I have prepared is in the list as "NaN". I make the following solution so that they do not appear on the list;

    grid2.js;
    Code:
    if(value !== undefined) {
        var $td = $('<td align="right" width="'+columnWidth+'%">').html(this.formatCellValue(value, this.column));
        $td.css({'word-wrap': 'break-word'});
        $tr.append($td);
        $table.append($tr);
    }
    But this is still on the color list. I am adding this sample image.
    This user coloring data is being prepared in flotr2.js file.

    Code:
    fragments.push(
        '<td class="flotr-legend-color-box">',
            '<div style="border:1px solid ', legend.labelBoxBorderColor, ';padding:1px">',
            '<div style="width:', (boxWidth-1), 'px;height:', (boxHeight-1), 'px;border:1px solid ', series[i].color, '">', // Border
                '<div style="width:', boxWidth, 'px;height:', boxHeight, 'px;', color, '"></div>', // Background
            '</div>',
            '</div>',
        '</td>',
        '<td class="flotr-legend-labelflotr-legend-label">', label, '</td>'
    );
    But I do not know how to hide it from the list "NaN" from the list here. Could you help me?
    Thank you.
    Attached Files

  • #2
    for me the best is filter data on the server side.
    If value empty or not numeric - unset from report result. And you will have no problem with UI. And Export Report as well.
    If you hack it on the UI, you need to hack it in Export as well.

    Comment


    • #3
      Originally posted by tanya View Post
      for me the best is filter data on the server side.
      If value empty or not numeric - unset from report result. And you will have no problem with UI. And Export Report as well.
      If you hack it on the UI, you need to hack it in Export as well.
      Yes, you are right. But I can not do this because I have more than one column. And I have to throw these users into the reportData variable. I added sample pictures. If you look images, you will be entitled to me.The users are kept in one place, not the ones in the pillars. And it may not be the data in every column of all of them. So I want to solve in the UI part.
      Attached Files

      Comment

      Working...
      X