Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Highchart自定义样式_Javascript_Jquery_Highcharts - Fatal编程技术网

Javascript Highchart自定义样式

Javascript Highchart自定义样式,javascript,jquery,highcharts,Javascript,Jquery,Highcharts,我需要显示我的饼图,如下图所示,但一旦我使用Highchart,我并没有得到相同的饼图用户界面 下图是我的项目中显示的饼图 有什么方法可以获得相同的饼图UI吗?要在Highcharts中获得类似的图表,您应该能够使用两个大小不同但内部大小相同的饼图系列: series: [{ colorByPoint: true, borderWidth: 0, innerSize: '30%', size: '120%', dataLabels: { e

我需要显示我的饼图,如下图所示,但一旦我使用Highchart,我并没有得到相同的饼图用户界面

下图是我的项目中显示的饼图


有什么方法可以获得相同的饼图UI吗?

要在Highcharts中获得类似的图表,您应该能够使用两个大小不同但内部大小相同的饼图系列:

  series: [{
    colorByPoint: true,
    borderWidth: 0,
    innerSize: '30%',
    size: '120%',
    dataLabels: {
      enabled: false,
    },
    data: [{
      name: 'one',
      y: 56.33,
      color: 'rgba(0,0,0,0)'
    }, {
      name: 'two',
      y: 24.03,
      color: 'rgba(0,0,0,0)'
    }, {
      name: 'three',
      y: 10.38,
      color: 'rgba(0,0,0,0)'
    }, {
      name: 'four',
      y: 24.77
    }, {
      name: 'five',
      y: 10.91,
      color: 'rgba(0,0,0,0)'
    }, {
      name: 'six',
      y: 10.2,
      color: 'rgba(0,0,0,0)'
    }]
  }, {
    colorByPoint: true,
    borderWidth: 0,
    innerSize: '30%',
    size: '80%',
    data: [{
      name: 'one',
      y: 56.33
    }, {
      name: 'two',
      y: 24.03,
    }, {
      name: 'three',
      y: 10.38
    }, {
      name: 'four',
      y: 24.77
    }, {
      name: 'five',
      y: 10.91
    }, {
      name: 'six',
      y: 10.2
    }]
  }]
实例:

您应该能够使用两个饼图系列来获得类似的图表:感谢@GrzegorzBlachliński的帮助:我正在为这个饼图使用图例,如果我通过图例禁用一个值,则特定于图例的突出显示数据将保持在相同的宽度上。您应该能够使用legendItemClick隐藏连接点:非常感谢您的努力: