将扇形图渲染为折线图

我想渲染一个图表,是否有任何建议在ChartJS上制作这样的图表:FanChartExample

我当前的图表选项:

    public lineChartOptions: any = {
        maintainAspectRatio: false,scales: {
            xAxes: [
                {
                    gridLines: {
                        drawBorder: false,display: false
                    }
                }],yAxes: [
                {
                    gridLines: {
                        drawBorder: false,color: 'rgb(181,181,181)',borderDash: [8,4],display: true
                    },ticks: {
                        padding: 20,callback: (label,index,labels) => {
                            var n = label.toString(),p = n.indexOf('.');
                            return n.replace(/\d(?=(?:\d{3})+(?:\.|$))/g,($0,i) => {
                                let result = p < 0 || i < p ? ($0 + ',') : $0
                                console.log(result,"ticks")
                                return result;
                            });
                        }
                    },scaleLabel: {
                        display: false,labelString: 'mil = 1000'
                    }
                }]
        },annotation: {
            annotations: [
            ],},elements: {
            point:
            {
                radius: 1,hitRadius: 3,hoverRadius: 5,hoverBorderWidth: 2
            }
        },responsive: true,};

仅我想提供关于图表,轴等的建议或示例对我而言并不重要。

tian_tang123 回答:将扇形图渲染为折线图

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3062869.html

大家都在问