D3 图表中未绘制区域的自定义颜色(角度)

问题描述 投票:0回答:1

我想为 d3 图表中的拉丝部分应用一些颜色,为非拉丝区域应用一些颜色。

  const brush = d3.brush()
  .extent([[0, 0], [width, height]])
  .on('start', brushstart)
  .on('end', brushed);

  svg.append('g')
  .attr('class', 'brush')
  .call(brush)

 const brushSelection = svg.select('.brush .selection');
  brushSelection
    .attr('fill', 'black')

通过这种方法,我可以为拉丝部分设置颜色,如何为未拉丝区域实现相同的颜色。

angular d3.js brush
1个回答
0
投票

好帖子,请提供更多信息。感谢分享。

© www.soinside.com 2019 - 2024. All rights reserved.