我使用highcharts时遇到了很大的问题,因为我已经花了好几个小时来包装传奇项目,如果它们非常长.我尝试设置图例和图例项目宽度,但我的文字仍然从图例中获取.我发现只有改变highcharts.src.js,但我认为这不是解决这个问题的方法.这是我的代码:
<script type="text/javascript">
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'graph_container',
defaultSeriesType: 'line',
zoomType: 'y',
marginRight: 130,
marginBottom: $ {
marginBottom
}
},
title: {
x: -10,
text: null
},
xAxis: {
title: {
text: '<fmt:message key="html.time" bundle="${msg}"/>',
align: 'high'
},
categories: [$ {
years
}]
},
yAxis: {
title: {
text: '<fmt:message key="html.value" bundle="${msg}"/>',
align: 'high'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
style: {
fontSize: '9pt',
width: '400px', …Run Code Online (Sandbox Code Playgroud)