使用高图的角度森伯斯特图表不显示不同的颜色

问题描述 投票:0回答:0

我正在尝试使用 Angular 中的 Highcharts 显示旭日图。图表正在显示,但问题出在颜色上。我提到了一组颜色,但图表只显示了数组中的第一种颜色。有人可以帮我我在这里做错了什么吗?

下面是我的代码:

this.chart = Highcharts.chart('container', {

      chart: {
        type: 'sunburst',
        height: '100%'
      },
      colors: ['#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce',
        '#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a'], 
      title: {
          text: 'PSec GEARS Function Usage'
      },
      subtitle: {
          text: 'Top 10 Functions used as % per User for the last Month'
      },
      credits: {
          enabled: false
      },
      tooltip: {
        headerFormat: '',
        pointFormat: 'The population of <b>{point.name}</b> is <b>{point.value}</b>'
      }, 

      series: [{
        type: "sunburst",
        data: this.dataValues,
        cursor: 'pointer',
        dataLabels: {
            format: '{point.name}',
            filter: {
                property: 'innerArcLength',
                operator: '>',
                value: 16
            },
            rotationMode: 'circular'
        },
        
        levels: [{
          level: 1,
          dataLabels: {
            filter: {
              property: 'outerArcLength',
              operator: '>',
              value: 64
            }
          }
        }, {
          level: 2,
          colorByPoint: true
        },
        {
          level: 3,
          colorVariation: {
            key: 'brightness',
            to: -0.5
          }
        }, {
          level: 4,
          colorVariation: {
            key: 'brightness',
            to: 0.5
          }
        }]
      }]
    });

这是我得到的输出图表的图像:

angular typescript charts highcharts angular-highcharts
© www.soinside.com 2019 - 2024. All rights reserved.