如何将工具提示大数据划分为每列 10 个不同的列

How can i divide the tooptip large data in different columns 10 per column

chart = c3.generate({
      bindto: "#yearly",
      data: {
        x: 'x',
        columns: [
         [x,1,2,.....,100],
         [data1,10,20.....,30],
         [data2,15,16,......,90],
         .
         .
         .
         [data50,20,30,......,80]
      ]
      }
});

在我的 tooptip 中显示了 1 到 50 行,但我想将它们分成 10 行的列

喜欢-

数据 1 - 10 |数据 11 - 10

。 |.

。 |.

data10 -20 |data20 - 50

尝试用回调函数覆盖工具提示内容,

  tooltip: {
      contents: function (d, defaultTitleFormat, defaultValueFormat, color) {
       // Inspect d and see how the data coming
       // Assuming d.data is the array you are talking about
      var data="";
      for(i=0;i<49;i=i+10)
      {
      for(j=i;j<j+10:j++)
      data+=" "+j
      }
      if(i!=49)
      data=+" | "
      }
        return data // you can use formatted html as well

    }