Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/452.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 日期筛选器在DC JS图表和数据表中不起作用_Javascript_Html_D3.js_Dc.js - Fatal编程技术网

Javascript 日期筛选器在DC JS图表和数据表中不起作用

Javascript 日期筛选器在DC JS图表和数据表中不起作用,javascript,html,d3.js,dc.js,Javascript,Html,D3.js,Dc.js,我正在使用DC JS构建图表和数据表。我在代码上方单独添加了日期过滤器,以便选择日期范围。但是,当我选择日期范围时。数据表中的所有内容都被删除了,有时它只显示来自最高日期的数据 任何帮助都将不胜感激 `//Html Code for Date Button <div class="col-sm-6"> <span style="font-size: 12px;">DATE<input type="text" class="form-control date_

我正在使用DC JS构建图表和数据表。我在代码上方单独添加了日期过滤器,以便选择日期范围。但是,当我选择日期范围时。数据表中的所有内容都被删除了,有时它只显示来自最高日期的数据

任何帮助都将不胜感激

`//Html Code for Date Button
<div class="col-sm-6">
    <span style="font-size: 12px;">DATE<input type="text" class="form-control date_filter txt_bxe_height cstm_txt_width" id="fromdate"> 
    </div></span>
    <div style="margin-left: -4%;" class="col-sm-6"><span style="font-size: 12px;">TO
    <input type="text" class="form-control date_filter txt_bxe_height" id="todate">
     <h5 class="" id="daterange"></h5></span>
    </div> 

//For Data Table
<div class="col-sm-4">
    <h4 class="titles">PLAN FOR TOMORROW</h4>
    <div class="chart_custom tabel_height">
    <table  class="table table-bordered" id="tabel_plan"></table>
    </div>    
  </div>



----------------------------------------------Javascript Code for both 

 d3.select('#daterange').on('click', function(){    
    var todate=$('#todate').val();
    var fromdate=$('#fromdate').val();     
        exptDimension_recom.filterRange([fromdate,todate]); 
        dc.renderAll();  
       dc.redrawAll();  

    });
    d3.select('#daterange2').on('click', function(){    
    var todate2=$('#todate2').val();
    var fromdate2=$('#fromdate2').val();     
        exptDimension_recom.filterRange([fromdate2,todate2]);   
        dc.renderAll();
         dc.redrawAll();  

tabel_task
        .width(768)
        .height(480)
        .size(10)
        .dimension(exptDimension_task)
        .group(rank2)        
        .columns([function (d) { return  d.Date },
              function (d) { return d["Tasks Performed"] }])
        .sortBy(function (d) { return d.Date })
        .order(d3.descending)`

哎呀,我想我看错了,应用程序不允许我取消投票。如果你能制作一把小提琴来演示这个问题,那会有所帮助。我们还需要查看维度构造代码。同样,上面没有足够的代码来帮助您诊断。您尚未发布您的交叉过滤器初始化代码。如果你能创作一把小提琴,那就更好了。对不起,这是一个虚假的重复投票,我已经取消了。