我有以下数据集:
let data = [
{patientId: 100, site: "AAA", timepoint: 0},
{patientId: 100, site: "AAA", timepoint: 2},
{patientId: 100, site: "AAA", timepoint: 4},
{patientId: 100, site: "AAA", timepoint: 6},
{patientId: 100, site: "AAA", timepoint: 8},
{patientId: 100, site: "AAA", timepoint: 12},
{patientId: 101, site: "AAA", timepoint: 0},
{patientId: 101, site: "AAA", timepoint: 2},
{patientId: 101, site: "AAA", timepoint: 4},
{patientId: 200, site: "BBB", timepoint: 2},
{patientId: 200, site: "BBB", timepoint: 4},
{patientId: 200, site: "BBB", timepoint: 6},
{patientId: 201, site: "BBB", timepoint: 0},
{patientId: 201, site: "BBB", timepoint: 6},
{patientId: 201, site: "BBB", timepoint: 8},
{patientId: 201, site: "BBB", timepoint: 12},
{patientId: 202, site: "BBB", timepoint: 0},
{patientId: 202, site: "BBB", timepoint: 2},
{patientId: 202, site: "BBB", timepoint: 4},
{patientId: 202, site: "BBB", timepoint: 6},
{patientId: 202, site: "BBB", timepoint: 8},
{patientId: 202, site: "BBB", timepoint: 12}
];
我想建立一个饼图,反映出具有给定时间点数的患者数量。因此,基于上述数据得到的饼图将是:
我希望此维度/组能够与为crossfilter数据定义的其他基本维度/组一起使用。