AmCharts label autoWrap
Auto-wrap puts labels outside the chart unless "inside" is used
HTML
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<div id="chartdiv"></div>
CSS
#chartdiv {
width: 100%;
height: 500px;
}
JavaScript
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
/*"marginTop": 5,
"marginRight": 0,
"marginLeft": 0,
"marginBottom": 20,*/
"autoMargins": false,
"categoryField": "value",
"categoryAxis": {
"axisAlpha": 0,
"autoGridCount": false,
"gridAlpha": 0.1,
"gridPosition": "middle",
"labelFrequency": 1,
"tickLength": 1,
//"inside": true,
"autoWrap": false
},
"valueAxes": [{
"position": "left",
"titleColor": "#606060",
"titleBold": false,
"startOnAxis": true,
"axisColor": "#909090",
"gridAlpha": 0.1,
"axisAlpha": 1.0
}],
"graphs": [{
"bulletSize": 1,
"bullet": "circle",
"valueField": "category",
"balloonText":"<div style='margin:10px; text-align:left;'><span style='font-size:13px'>[[category]]</span><br><span style='font-size:18px'>Value:[[value]]</span>",
}],
"dataProvider": [{
"category": "Very long category name",
"value": 0
}, {
"category": "Something extremely extended",
"value": 3
}, {
"category": "This text belongs in a book...",
"value": 2
}, {
"category": "...and not in a category label",
"value": 4
}],
});