Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/371.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 数据表从列值中闪烁_Javascript_Ruby On Rails_Datatables - Fatal编程技术网

Javascript 数据表从列值中闪烁

Javascript 数据表从列值中闪烁,javascript,ruby-on-rails,datatables,Javascript,Ruby On Rails,Datatables,在我的应用程序中,我有一个datatable(datatables.net),该表正在获取json数据并填充该表 其中一列是获取一个整数数组,此列需要隐藏整数值,并在这些值的帮助下绘制一个迷你图 if $('#keys').length tC = $('#keys') tC.dataTable bJQueryUI: true bAutoWidth: false bStateSave: false iDisplayLength: 25 oScroller: loadi

在我的应用程序中,我有一个
datatable
(datatables.net),该表正在获取json数据并填充该表

其中一列是获取一个整数数组,此列需要隐藏整数值,并在这些值的帮助下绘制一个迷你图

 if $('#keys').length
tC = $('#keys')
tC.dataTable
  bJQueryUI: true
  bAutoWidth: false
  bStateSave: false
  iDisplayLength: 25
  oScroller:
    loadingIndicator: true
  fnPreDrawCallback: ->
    responsiveHelper = new ResponsiveDatatablesHelper(tC, breakpointDefinition) unless responsiveHelper
  fnRowCallback: (nRow, aData, iDisplayIndex, iDisplayIndexFull) ->
    responsiveHelper.createExpandIcon nRow
  fnDrawCallback: (oSettings) ->
    responsiveHelper.respond()
    comparekeys();
  bServerSide: true
  sAjaxSource: $('#keys').data('source')
这个填充我的表格的代码和下面的代码是用来画火花线的

 if $('#comp').length
pot_com = $('#pot_com').data('results')
col = 0
while col < pot_com
  spark_pot = $('#comp_pot' + col).data('results')
  new Highcharts.Chart(
    chart:
      renderTo: "com_pot#{col}"
      backgroundColor: 'none'
      defaultSeriesType: "area"
      margin: [0, 0, 0, 0]
    title: text: false
    credits: enabled: false
    xAxis: labels: false
    yAxis: labels: false
    legend: enabled: false
    tooltip: enabled: false
    exporting: enabled: false
    plotOptions:
      series:
        lineWidth: 1
        shadow: false
        states: hover: lineWidth: 1
        marker:
          enabled: true
          radius: 1
    series: [
      fillColor: "rgb(230, 136, 138)"
      data: spark_pot
    ]
  )
  col++
if$('#comp').length
pot_com=$('#pot_com')。数据('results'))
col=0
而col
pot_com=$('#pot_com')。数据('results')
正在获取结果总数

spark_pot=$('comp_pot'+col)。数据('results')
正在获取当前行值

我能够使用代码在没有任何服务器端渲染的datatable上创建迷你图

如何使用服务器端处理在
数据表上添加迷你图?

我找到了一个解决方案,唯一需要做的就是从每行中获取值数组