Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/398.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 角度太阳暴流图_Javascript_Angular_Highcharts - Fatal编程技术网

Javascript 角度太阳暴流图

Javascript 角度太阳暴流图,javascript,angular,highcharts,Javascript,Angular,Highcharts,您好,我正在使用Highchart作为sunburst图表,但由于出现错误,我无法了解代码中的错误,因此请帮助我 我的HTML代码是: <highcharts-chart [Highcharts]="highcharts1" [options]="chartOptions1" style="width: 100%; height: 200px; display: block;"> </highcharts-chart> Ts代码是 cha

您好,我正在使用Highchart作为sunburst图表,但由于出现错误,我无法了解代码中的错误,因此请帮助我

我的HTML代码是:

<highcharts-chart
    [Highcharts]="highcharts1"
    [options]="chartOptions1"
    style="width: 100%; height: 200px; display: block;">
  </highcharts-chart>

Ts代码是

chartData = [
        {
            id: '2.13',
            parent: '1.3',
            name: 'Southern Asia'
        }
        ];
 highcharts1: typeof Highcharts = Highcharts;
    chartOptions1: Highcharts.Options = <any> {
        chart: {
            height: '100%'
        },
        title: {
            text: 'World population 2017'
        },
        subtitle: {
            text: 'Source <href="https://en.wikipedia.org/wiki/List_of_countries_by_population_(United_Nations)">Wikipedia</a>'
        },
        series: [{
            type: "sunburst",
            data: this.chartData,
            allowDrillToNode: true,
            cursor: 'pointer',
            dataLabels: {
                format: '{point.name}',
                filter: {
                    property: 'innerArcLength',
                    operator: '>',
                    value: 16
                }
            },
            levels: [{
                level: 1,
                levelIsConstant: false,
                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
                }
            }]

        }]
    };

chartData=[
{
id:'2.13',
家长:'1.3',
名称:“南亚”
}
];
海图1:海图类型=海图;
图表选项1:Highcharts.Options='1
},
系列:[{
类型:“太阳风暴”,
data:this.chartData,
allowDrillToNode:true,
光标:“指针”,
数据标签:{
格式:“{point.name}”,
过滤器:{
属性:“innerArcLength”,
运算符:“>”,
价值:16
}
},
级别:[{
级别:1,
levelIsConstant:false,
数据标签:{
过滤器:{
属性:“outerArcLength”,
运算符:“>”,
数值:64
}
}
}, {
级别:2,
colorByPoint:正确
},
{
级别:3,
颜色变化:{
键:“亮度”,
至:-0.5
}
}, {
级别:4,
颜色变化:{
键:“亮度”,
至:0.5
}
}]
}]
};
" 获取以下错误。 错误:Highcharts错误#17:www.Highcharts.com/errors/17 在c.Chart.h(highcharts.js:12)”
有人能帮我找出代码中缺少的内容吗?

sunburst图表需要以下模块/sunburst.js

Sunburst.js位置:

API参考:

您需要导入并初始化
sunburst
模块:

import * as Highcharts from 'highcharts';
import HC_sunburst from 'highcharts/modules/sunburst';
HC_sunburst(Highcharts);

文档:

如何导入angular7Hi我正在尝试为3个级别设置暗、亮和极光级别的颜色变化,如何实现这一点。Hi我正在尝试为3个级别设置暗、亮和极光级别的颜色变化,如何实现这一点。Hi@Sudhir,请创建一个带有
highcharts
标记的新问题。