将Highcharts.js与odoo一起使用

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

我想在公司的仪表板中使用Highcharts,我正在使用Odoo框架。之前,我已经将另一个Js库与Odoo集成在一起,我遵循相同的步骤。最后,我得到了图表,但没有显示文本,图例或其他任何内容。有什么问题吗?enter image description here

var chart = new Highcharts.chart('container', {
                    chart: {
                        type: 'pyramid'
                    },
                    title: {
                        text: 'Sales pyramid',
                        x: -50
                    },
                    plotOptions: {
                        series: {
                            dataLabels: {
                                enabled: true,
                                format: '<b>{point.name}</b> ({point.y:,.0f})',
                                softConnector: true
                            },
                            center: ['40%', '50%'],
                            width: '80%'
                        }
                    },
                    legend: {
                        enabled: false
                    },
                    series: [{
                        name: 'Unique users',
                        data: [
                            ['Website visits', 15654],
                            ['Downloads', 4064],
                            ['Requested price list', 1987],
                            ['Invoice sent', 976],
                            ['Finalized', 846]
                        ]
                    }],

                    responsive: {
                        rules: [{
                            condition: {
                                maxWidth: 500
                            },
                            chartOptions: {
                                plotOptions: {
                                    series: {
                                        dataLabels: {
                                            inside: true
                                        },
                                        center: ['50%', '50%'],
                                        width: '100%'
                                    }
                                }
                            }
                        }]
                    }
                });
highcharts odoo odoo-12
1个回答
0
投票

我删除了Highcharts使用的可访问性模块,因为aria-hidden来自该库并且可以正常工作。

© www.soinside.com 2019 - 2024. All rights reserved.