如何按 Y 维恩图翻转? (venn.js)

How to flip by Y venn diagramm? (venn.js)

我用 d3.js 和 venn.js 构建了简单的维恩图:https://jsfiddle.net/rvuf1z5o/

var sets = [
    {sets: ['F'], size: 3},
    {sets: ['G'], size: 3},
    {sets: ['C'], size: 3},
    {sets: ['F','G'], size: 1},
    {sets: ['F','C'], size: 1},
    {sets: ['G','C'], size: 1},
    {sets: ['F','G','C']}
];

var chart = venn.VennDiagram();
var div = d3.select("#venn").datum(sets).call(chart);

我需要按Y翻转这张图表,如图所示:

如何使用集合/图表对象/svg 属性/css?

谢谢指教。

看来您可以通过切换声明集合的顺序来重新排列它们的位置。工作 jsfiddle

var sets = [
{sets: ['F'], size: 3},
{sets: ['G'], size: 3},
{sets: ['C'], size: 3},

{sets: ['G','C'], size: 1},
{sets: ['F','C'], size: 1},
{sets: ['F','G'], size: 1},

{sets: ['F','G','C']}
];

var chart = venn.VennDiagram();
var div = d3.select("#venn").datum(sets).call(chart);

修改后的代码在底部,因为我必须粘贴到 venn.js