1

我正在尝试根据属性将 lineWidth 设置为每一行。如果某些属性具有某些值,则应定义该折线的宽度。

我对颜色有类似的功能:

parcoords.color(function(d){
  return colorCluster(d.Cluster);
}).render()

现在我正在寻找类似的线宽

4

1 回答 1

1

这对于当前的库来说是不可能的,尽管添加它并不困难。

将属性'lineWidth'添加到start.js中的__对象,然后在style.js中的path_brushed、path_foreground、path_highlight下添加 ctx.brushed.lineWidth = d3.functor(__.lineWidth)(d, i);

然后就像您调用 parcoords.color() 一样,您将使用 parcoords.lineWidth() 传递一个基于属性返回线宽值的函数。

在 github 项目下发布 issue,看看社区是否喜欢这个功能。

于 2016-03-21T16:40:45.960 回答