Сделать индекс строки многострочным в canvasjs для Donut Chart - PullRequest
1 голос
/ 30 мая 2019

Я использую библиотеку canvasjs для генерации данных столбцов.

var chart = new CanvasJS.Chart("<%=BankBalanceChartContainer.ClientID%>", {
            //colorSet: "chartdatacolor",
            theme:  "light2",
             exportFileName: "Doughnut Chart",
            exportEnabled: true,            
            animationEnabled: true,
            legend:{
                cursor: "pointer",
                itemclick: explodePie
            },
            axisX: {
                valueFormatString: "MMM YYYY",
                interval: 1,
                intervalType: "month"
            },
            axisY: { 
                 valueFormatString: "$#,##0.##",
            },           
            legend:{
                cursor: "pointer",
                itemclick: explodePie
            },
            toolTip:{   
                content: "{name}: "+ billingcurrency +" {y}"      
            },
            data: [
            {

                type: "doughnut",
                radius: 100,
                innerRadius: 50,    
                showInLegend: true,        
                indexLabel: " {label}",
                indexLabelFontSize: 12,
                dataPoints: dataArray,
            }
            ]
        });

        chart.render();

пончик в метке Отобразить как:США 100,00SGD 125,00

Не используется indexLabelMaxWidth и indexLabelWrap.Использование элемента Dom br

...