我无法在JQChart中显示标签

I can not display the labels in JQChart?

本文关键字:显示 标签 JQChart      更新时间:2023-09-26

帮助,如何获得饼图标题三角形而不是百分比。这个例子的文档被认为非常快速,没有使用文本而不是数字。

我有一个代码:

                $('#jqChart').jqChart({
                    legend: { visible: false },
                    animation: { duration: 1 },
                    series: [
                        {
                            type: 'pie',
                            fillStyles: ['#418CF0', '#FCB441', '#E0400A', '#056492', '#BFBFBF'],
                            labels: {
                                stringFormat: '%s',
                                valueType: 'dataValue',
                                font: '15px sans-serif',
                                fillStyle: 'white'
                            },
                            data: [['N', 65], ['A', 58], ['B', 30],
                                ['F', 60], ['C', 65]]
                        }
                    ]
                }); 

我有图像,有足够的显示,我想改变。http://i57.tinypic.com/158babt.jpg

我尝试了很多选项,更改了stringFormat,但不幸的是,它不起作用。我做错了什么,谢谢你的帮助。

$('#jqChart').bind('dataPointLabelCreating', function (event, data) {
                data.text = data.context.dataItem[0];
            });

            $('#jqChart').jqChart({
                legend: { visible: false },
                animation: { duration: 1 },
                series: [
                    {
                        type: 'pie',
                        fillStyles: ['#418CF0', '#FCB441', '#E0400A', '#056492', '#BFBFBF'],
                        labels: {
                            stringFormat: '%s',
                            valueType: 'dataValue',
                            font: '15px sans-serif',
                            fillStyle: 'white'
                        },
                        data: [['N', 65], ['A', 58], ['B', 30],
                        ['F', 60], ['C', 65]]
                    }
                ]
            });