https://i.stack.imgur.com/9R2Hj.png
嗨,
我尝试添加包含3个不同图表的折线图。图形渲染工作正常但气球非常不平衡(见图),因此对生产使用无效。如果我添加水平或垂直填充,它没有帮助。
我必须在这里做错事但我无法弄清楚它是什么。有人会弄清楚奇怪的气球行为的原因吗?
var chart3 = AmCharts.makeChart("chartdiv3", {
"type": "serial",
"theme": "light",
"marginRight": 20,
"marginLeft": 50,
"autoMarginOffset": 20,
"mouseWheelZoomEnabled": true,
"dataDateFormat": "YYYY-MM-DD",
"chartCursor": {
"fullWidth": true,
"valueLineEnabled": true,
"valueLineBalloonEnabled": true,
"valueLineAlpha": 0.5,
"cursorAlpha": 0
},
"valueAxes": [{
"id": "v1",
"axisAlpha": 0,
"position": "left"
}],
"balloon": {
"borderThickness": 1,
"shadowAlpha": 0
},
"graphs": [{
"id": "g1",
"balloon": {
"adjustBorderColor": false,
"color": "#ffffff",
"horizontalPadding": 20,
"verticalPadding": 20
},
"dashLength": 3,
"bullet": "round",
"bulletBorderAlpha": 1,
"bulletSize": 6,
"hideBulletsCount": 100,
"lineThickness": 2,
"title": "received",
"useLineColorForBulletBorder": true,
"valueField": "Value",
"balloonText": "<span style='font-size:16px;'>[[Value]]</span>"
},
{
"id": "g2",
"balloon": {
"adjustBorderColor": false,
"color": "#ffffff"
},
"bullet": "round",
"bulletBorderAlpha": 1,
"bulletColor": "#FFFFFF",
"bulletSize": 5,
"hideBulletsCount": 50,
"lineThickness": 2,
"title": "red line",
"useLineColorForBulletBorder": true,
"valueField": "Value2",
"balloonText": "<span style='font-size:12px;'>[[Value2]]</span>"
},
{
"id": "g3",
"balloon": {
"adjustBorderColor": false,
"color": "#ffffff"
},
"bullet": "round",
"bulletBorderAlpha": 1,
"bulletColor": "#FFFFFF",
"bulletSize": 5,
"hideBulletsCount": 50,
"lineThickness": 2,
"title": "red line",
"useLineColorForBulletBorder": true,
"valueField": "Value3",
"balloonText": "<span style='font-size:12x;'>[[Value3]]</span>"
}],
"chartScrollbar": {
"graph": "g1",
"oppositeAxis": false,
"offset": 30,
"scrollbarHeight": 80,
"backgroundAlpha": 0,
"selectedBackgroundAlpha": 0.1,
"selectedBackgroundColor": "#888888",
"graphFillAlpha": 0,
"graphLineAlpha": 0.5,
"selectedGraphFillAlpha": 0,
"selectedGraphLineAlpha": 1,
"autoGridCount": true,
"color": "#AAAAAA"
},
"chartCursor": {
"pan": true,
"valueLineEnabled": true,
"valueLineBalloonEnabled": true,
"cursorAlpha": 1,
"cursorColor": "#258cbb",
"limitToGraph": "g1",
"valueLineAlpha": 0.2,
"valueZoomable": true
},
"categoryField": "Date",
"categoryAxis": {
"parseDates": true,
"dashLength": 1,
"minorGridEnabled": true,
"dateFormats":
[
{ period: 'fff', format: 'JJ:NN:SS' },
{period:'ss',format:'JJ:NN:SS'},
{period:'mm',format:'JJ:NN'},
{period:'hh',format:'JJ:NN'},
{period:'DD',format:'MMM DD'},
{period:'WW',format:'MMM DD'},
{period:'MM',format:'MM'},
{period: 'YYYY', format: 'YYYY' }
]
},
"export": {
"enabled": true
},
"dataProvider": Home.realizedReturnsChartItems
});
}
&#13;