amcharts / amcharts3

JavaScript Charts V3
Other
395 stars 129 forks source link

Titles are overlapping #118

Open gopal0430 opened 7 years ago

gopal0430 commented 7 years ago

Hi their, I am new to AmCharts ,my sample codes with JSFiddle,.Facing a problem in Title overlapping .Is their any way to solve it ???

image

``var chart; var legend;

var chartData = [{ Fund: 'Australia', value: 1014 }, { Fund: 'Africa', value: 649 }, { Fund: 'Afghanistan', value: 647 }, { Fund: 'Brazil', value: 639 }, { Fund: 'Germany', value: 634 }, { Fund: 'UK', value: 390 }, { Fund: 'India', value: 379 }, { Fund: 'singapure', value: 377 }, { Fund: 'Malaysia', value: 251 }, { Fund: 'Italy', value: 127 }

];

AmCharts.ready(function() { // PIE CHART chart = new AmCharts.AmPieChart(); chart.dataProvider = chartData; chart.titleField = "country"; chart.valueField = "value"; chart.percentFormatter = { precision: 1, decimalSeparator: '.', thousandsSeparator: ',' }; chart.outlineThickness = 1; chart.labelText = "[[percents]]%"; chart.hideLabelsPercent = 2.4; chart.labelRadius = 35; chart.startRadius = "0%"; //start explode chart.pullOutRadius = "20%"; chart.labelTickColor = "black"; chart.labelTickAlpha = 0.8;

chart.balloonText = "[[title]]:\u00a3[[value]]\n[[description]]"; // this makes the chart 3D chart.depth3D = 15; chart.angle = 40;

chart.sequencedAnimation = false; chart.startDuration = 0;

// WRITE chart.write("chartdiv"); });

martynasma commented 7 years ago

Looks like your fiddle is using old (V2) version of the Pie chart.

V3 (current version) implements some label overlapping check.

Upgrading might fix the issue for you:

http://jsfiddle.net/6sjyx79u/14/