gpt4 book ai didi

javascript - Angular 的 Highchart 漏斗

转载 作者:行者123 更新时间:2023-11-30 16:11:22 27 4
gpt4 key购买 nike

有人用过 Highchart Funnel for Angular 吗?

我使用 highchart-ng ( https://github.com/pablojim/highcharts-ng ),但漏斗不起作用。

我使用 ng-highchart 的代码是:

$scope.chartSalesFunnel = {
options: {
chart: {
type: 'funnel',
marginRight: 100
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '<b>{point.name}</b> ({point.y:,.0f})',
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black',
softConnector: true
},
neckWidth: '30%',
neckHeight: '25%'

//-- Other available options
// height: pixels or percent
// width: pixels or percent
}
},
},
title: {
text: '',
},

legend: {
enabled: false
},
series: [{
name: 'Unique users',
data: [
['Website visits', 15654],
['Downloads', 4064],
['Requested price list', 1987],
['Invoice sent', 976],
['Finalized', 846]
]
}]
};

最佳答案

漏斗图类型需要额外的漏斗模块,如所述 in the API .

你可以像这样包含它:

<script src="https://code.highcharts.com/modules/funnel.js"></script>

参见 this updated JSFiddle包含此模块的代码。

关于javascript - Angular 的 Highchart 漏斗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36209492/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com