Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

Highcharts venn diagram is missing intersections

In given intersections between groups, I found that the intersection between "B" and "C" i.e. ["C", "B"] is not shown in the chart.

Code sandbox can be found here

const vennData = [
{
    sets: ["A"],
    value: 754,
    color: "#38618C",
},
{
    sets: ["B"],
    value: 755,
    color: "#FF9A47",
},
{
    sets: ["C"],
    value: 1949,
    color: "#41C8BB",
},
{
    sets: ["D"],
    value: 2749,
    color: "#F9CF5A",
},
{
    sets: ["D", "C"],
    value: 186,
    color: "#3fa242",
},
{
    sets: ["A", "C"],
    value: 118,
    color: "#0e4c67",
},
{
    sets: ["D", "A"],
    value: 78,
    color: "#374f31",
},
{
    sets: ["D", "A", "C"],
    value: 35,
    color: "#0e3e24",
},
{
    sets: ["D", "B"],
    value: 47,
    color: "#f97d19",
},
{
    sets: ["C", "B"],
    value: 31,
    color: "#417934",
},
{
    sets: ["D", "C", "B"],
    value: 5,
    color: "#3f6212",
},
{
    sets: ["E"],
    value: 49,
    color: "#E95F5F",
},
{
    sets: ["D", "E"],
    value: 7,
    color: "#e44d22",
},
{
    sets: ["A", "B"],
    value: 44,
    color: "#383b27",
},
{
    sets: ["D", "A", "B"],
    value: 4,
    color: "#37300e",
},
{
    sets: ["A", "C", "B"],
    value: 9,
    color: "#0e2e1d",
},
{
    sets: ["D", "A", "C", "B"],
    value: 1,
    color: "#0e250a",
},
{
    sets: ["C", "E"],
    value: 4,
    color: "#3b4b46",
},
{
    sets: ["D", "C", "E"],
    value: 2,
    color: "#3a3d19",
},
];
Highcharts.chart('container', {
    series: [{
        type: 'venn',
        data: vennData, 
        opacity: 1,
    }]
});

I don't know whether I missed something in my code/config or maybe it's a Highchart bug.

Thanks in advance! :) BTW I've got many examples if needed, this one is the smallest and simplest one I've found.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Highcharts reached out and gave some important information in regards to Venn diagrams:

  1. Geometric wise, circles support up to three groups, as you can see in the attached video.

  2. Currently, Highcharts [8.2.2] only supports circles.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...