[英]Can i show table on x-axis as like grouped categories in highcharts - But no grouping
[英]How can i wrap label text in Highcharts Grouped Categories
我可以包装标签文本或增加单元格高度以使其响应吗? 这是我的jsfiddle 。
的HTML:
<div id="container" class="chart-container"></div>
jQuery的:
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: "container",
type: "column",
marginLeft: 85,
marginRight: 15
},
title: {
useHTML: true,
x: 10,
y: 80,
text: ''
},
series: [{
data: [4, 14, 18, 5, 6, 5, 14, 15, 18]
}],
xAxis: {
style:{
overflow: 'none',
crop : false
},
min:0,
opposite:true,
labels: {
style: {
textOverflow: 'none',
whiteSpace: 'nowrap',
color: '#000000',
fontSize: '11px',
overflow: 'none',
crop : false,
},
gridLineWidth: 1,
groupedOptions: [ {
rotation: 0, // rotate labels for a 2nd-level
y:10,
}],
rotation: -90 // 0-level options aren't changed, use them as always
},
categories: [{
name: "Fruiqweqw ewqeqwet",
categories: ["Appleasd asdadd", "Bananaasd asdsa", "Orange asdad"]
}, {
name: "Vegetableasdasd",
categories: ["Carrot asd", "Potato sdf", "Tomato"]
}, {
name: "Fishqwewewqewq",
categories: ["Codasdsa", "Salmonasd", "Tuna"]
}]
}
});
});
x轴上的标签超出了给定的空间。 我在实际项目中有很多标签,有什么方法可以固定宽度而无需固定宽度?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.