【发布时间】:2016-12-06 13:49:24
【问题描述】:
我是 Stackoverflow 和谷歌图表的新手。
我的一个项目使用谷歌图表 api 时遇到问题,我正在绘制两个图例,但它们在预览时重叠。
我在 stackoverflow 和 jsfiddle 上尝试了各种解决方案,但都没有奏效。
这是我的一些代码 sn-p 和输出:
图表的配置对象:
var options = {
hAxis : {
title : xAxis,
textStyle:{
color: 'black',
fontSize : '8px'
},
slantedText : true,
slantedTextAngle : 90,
titleTextStyle : {
fontSize : '15px',
italic : false
},
},
vAxis : {
title : yAxis,
format:format,
textStyle:{
color: 'black',
fontSize : '8px'
},
titleTextStyle : {
fontSize : '15px',
italic : false
},
viewWindowMode : 'explicit',
viewWindow : {
min : 0,
//max: 1200000
}
},
backgroundColor : 'transparent',
interpolateNulls: false,
width : 350,
height : 180,
chartArea : {
left : 40,
width : '45%',
height : '45%'
},
legend: {
position: 'top',
maxLines: 3,
},
series : {
0 : {
color : line1Color,
visibleInLegend : true,
pointShape: 'square',
pointSize: 10,
},
1 : {
color : line2Color,
visibleInLegend : true,
pointShape: 'diamond',
pointSize: 10,
}
}
};
【问题讨论】:
标签: javascript charts google-visualization