Javascript 在crossfilter中是否有一种方法可以创建一个多线图,其中x和y值都是一个组的结果?

Javascript 在crossfilter中是否有一种方法可以创建一个多线图,其中x和y值都是一个组的结果?,javascript,d3.js,dc.js,crossfilter,Javascript,D3.js,Dc.js,Crossfilter,我的数据集如下所示: var livingThings = crossfilter([ { rate: 0.14, animal: "cat", months: 1, trial: "A"}, { rate: 0.77, animal: "cat", months: 1, trial: "B"}, { rate: 0.71, animal: "cat", months: 1, trial: "C"}, { rate: 0.99, animal: "cat", months: 2,

我的数据集如下所示:

var livingThings = crossfilter([
  { rate: 0.14, animal: "cat", months: 1, trial: "A"},
  { rate: 0.77, animal: "cat", months: 1, trial: "B"},
  { rate: 0.71, animal: "cat", months: 1, trial: "C"},
  { rate: 0.99, animal: "cat", months: 2, trial: "A"},
  { rate: 0.66, animal: "cat", months: 2, trial: "B"},
  { rate: 0.14, animal: "cat", months: 2, trial: "C"},
  { rate: 0.78, animal: "cat", months: 3, trial: "A"},
  { rate: 0.84, animal: "cat", months: 3, trial: "B"},
  { rate: 0.30, animal: "cat", months: 3, trial: "C"},
  { rate: 0.47, animal: "dog", months: 1, trial: "A"},
  { rate: 0.69, animal: "dog", months: 1, trial: "B"},
  { rate: 0.80, animal: "dog", months: 1, trial: "C"},
  { rate: 0.88, animal: "dog", months: 2, trial: "A"},
  { rate: 0.38, animal: "dog", months: 2, trial: "B"},
  { rate: 0.76, animal: "dog", months: 2, trial: "C"},
  { rate: 0.15, animal: "dog", months: 3, trial: "A"},
  { rate: 0.24, animal: "dog", months: 3, trial: "B"},
  { rate: 0.75, animal: "dog", months: 3, trial: "C"}
]);

ndx = crossfilter(livingThings);
我想用DC创建一个图表,为每只动物显示一条线,其中y值表示月平均发病率,x值表示月平均发病率。例如,下面的图是使用python为给定数据集生成的:

这适用于一个仪表板,该仪表板还将包含(例如)一个允许筛选折线图的试用维度饼图


我想尽一切办法都试过了,但还是做不好。有什么好主意吗?

你在找工作吗?一个常见的混淆点是叠加图和系列图有非常不同的接口。这是不幸的,但事情就是这样。我试着用线条图、合成图和系列图,但听了还是觉得不太对劲。我刚刚链接了一个例子,它有帮助吗?你在寻找答案吗?一个常见的混淆点是叠加图和系列图有非常不同的接口。这是不幸的,但事情就是这样。我试着用线条图、合成图和系列图,但听了还是觉得不太对劲。我刚刚链接了一个例子,它有帮助吗?