var chart = AmCharts.makeChart("chartdiv", {
"type": "xy",
"dataProvider": json,
"autoMargins": true,
"autoMarginOffset" : 10, //Space left from axis labels/title to the chart's outside border, if autoMargins set to true.
"valueAxes":
[
{
"id":"my_y",
"minorGridEnabled" : true,
"title":"Y AXIS",
"autoGridCount": false,
"position": "left",
"tickLength":0,
"minimum":0,
"maximum":240,
"gridCount": 32,
"labelFrequency" : 1.5,
"gridColor":"black", // center y axis
"gridAlpha":0.50, // grids visibily strength
"axisAlpha":0, // default axis at right hidden
},
{
"id":"my_x",
"minorGridEnabled" : true,
"title":"X AXIS",
"autoGridCount": false,
"position": "bottom",
"tickLength":0,
// "gridThickness": 0.25,
"minimum": 0,
"maximum":240,
"gridCount": 32,
"labelFrequency" : 1.5,
"gridColor":"black", // center x axis
"gridAlpha":0.50, // grids visibily strength
"axisAlpha":0, // default axis at bottom hidden
"strictGridCount" : true,
},
],
"borderAlpha" : 0, // opacity border of chart
"startDuration": 0, // animation , 0 = no animation
"legend":[{
"useGraphSettings": false,
"verticalGap":0,
}],
"graphs":
[
{
"id":"g1",
// "valueAxis": "v1",
"lineColor": "#FF6600",
// "bullet": "round",
"bulletBorderThickness": 1,
"hideBulletsCount": 30,
"animationDuration":0,
"bullet": "circle",
"colorField":"mycolor",
"valueField": "value",
"xField": "x",
"yField": "y",
"fillAlphas": 0, // 0 to avoid creating filled polygon with bullets, default = 0
"bulletBorderAlpha": 0,
"minBulletSize": 30,
"maxBulletSize": 30,
"labelText":"[[x]]",
"labelPosition":"inside",
"markerType" : "none",
"switchable":false,
},
],
"marginLeft": 20,
"marginBottom": 20,
"listeners": [
{
"event": "drawn",
"method": addLegendLabel
},
],
"export": {
"enabled": true,
"menu" : [],
},
});
Hoffnung gibt, ist es das, was Sie wollten .. sorry in Eile letztes Mal war daher die unklare Antwort
Wenn ich dich richtig verstehe, könnte [dies] (http://stackoverflow.com/questions/32095436/synchronize-valueaxis-grids) Ihnen helfen. Ich bin nicht mit all den Änderungen seit damals vertraut, also könnte dies veraltet sein. – gerric