datasketch / hgchmagic

https://datasketch.github.io/hgchmagic/
Other
3 stars 6 forks source link

Problem with pie charts with long labels #36

Closed jpmarindiaz closed 5 years ago

jpmarindiaz commented 7 years ago

Solution:

...
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    style: {
                        width: '100px'
                    },
                    enabled: true,
                    color: '#000000',
                    maxStaggerLines:1,                    
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %'                   

                },
            }

https://stackoverflow.com/questions/18329478/highcharts-pie-chart-how-to-set-labels-in-two-lines/18332595 http://jsfiddle.net/Fusher/fSjnD/1/

screen shot 2017-08-02 at 7 14 37 pm