Amcharts 类别轴刻度

Amcharts category axis scale

JSBIN : http://jsbin.com/jiduwiniwe/edit?html

所附图表的类别为轴,但轴比例是自动计算的,这使得图表很奇怪(不是它应该看起来的样子)。

如果您看到沿 y 轴的值,它是不统一的。知道如何使 Y 轴间隔均匀吗?

它应该看起来更像这样

[答案已根据评论完全重写]

看来,您正在使用任意值作为系列图表中的类别。类别轴不维护数字比例,它只是以相等的间隔放置每个类别,并在每个第 X 个类别中显示一个类别,这是一个超出比例的数字。因此标签以难以描述的间隔出现。

XY 图表更适合绘制在两个维度上都具有数字刻度的数据。 XY 图表将两个轴作为值,因此它将 space 超出您的比例,并在两个轴上显示有意义的值标签。

这是将您的图表重新制作成 XY 图表:

var chart = AmCharts.makeChart("chartdiv", {
  "type": "xy",
  "theme": "light",
  "autoMarginOffset": 10,      
  "rotate" : true,  
  "pathToImages": "http://cdn.amcharts.com/lib/3/images/",
  "path": "http://www.amcharts.com/lib/3/",
  "dataProvider":  [{"v_sec":0,"tvd":0,"date":"26\/02\/2015 16:38"},{"v_sec":0.42,"tvd":124.53,"date":"26\/02\/2015 16:39"},{"v_sec":0.66,"tvd":152.64,"date":"26\/02\/2015 16:40"},{"v_sec":1.02,"tvd":180.74,"date":"26\/02\/2015 16:41"},{"v_sec":1.43,"tvd":208.85,"date":"26\/02\/2015 16:42"},{"v_sec":1.91,"tvd":236.95,"date":"26\/02\/2015 16:43"},{"v_sec":2.4,"tvd":265.05,"date":"26\/02\/2015 16:44"},{"v_sec":2.67,"tvd":293.16,"date":"26\/02\/2015 16:45"},{"v_sec":2.69,"tvd":321.27,"date":"26\/02\/2015 16:46"},{"v_sec":2.52,"tvd":349.37,"date":"26\/02\/2015 16:47"},{"v_sec":2.19,"tvd":377.48,"date":"26\/02\/2015 16:48"},{"v_sec":1.62,"tvd":405.58,"date":"26\/02\/2015 16:49"},{"v_sec":1.04,"tvd":433.68,"date":"26\/02\/2015 16:50"},{"v_sec":0.63,"tvd":461.78,"date":"26\/02\/2015 16:51"},{"v_sec":0.39,"tvd":489.88,"date":"26\/02\/2015 16:52"},{"v_sec":0.47,"tvd":517.99,"date":"26\/02\/2015 16:53"},{"v_sec":0.8,"tvd":546.1,"date":"26\/02\/2015 16:54"},{"v_sec":1.34,"tvd":574.2,"date":"26\/02\/2015 16:55"},{"v_sec":1.84,"tvd":595.91,"date":"26\/02\/2015 16:56"},{"v_sec":2.21,"tvd":624.29,"date":"26\/02\/2015 16:57"},{"v_sec":2.06,"tvd":652.28,"date":"26\/02\/2015 16:58"},{"v_sec":1.62,"tvd":680.18,"date":"26\/02\/2015 16:59"},{"v_sec":1.47,"tvd":689.52,"date":"26\/02\/2015 17:00"},{"v_sec":1.37,"tvd":698.86,"date":"26\/02\/2015 17:01"},{"v_sec":0.63,"tvd":745.62,"date":"26\/02\/2015 17:02"},{"v_sec":-0.5,"tvd":792.41,"date":"26\/02\/2015 17:03"},{"v_sec":-1,"tvd":839.98,"date":"26\/02\/2015 17:04"},{"v_sec":-0.7,"tvd":887.63,"date":"26\/02\/2015 17:05"},{"v_sec":-0.31,"tvd":935.45,"date":"26\/02\/2015 17:06"},{"v_sec":-0.01,"tvd":982.78,"date":"26\/02\/2015 17:07"},{"v_sec":0.17,"tvd":1030.17,"date":"26\/02\/2015 17:08"},{"v_sec":-0.05,"tvd":1077.76,"date":"26\/02\/2015 17:09"},{"v_sec":-0.56,"tvd":1125.59,"date":"26\/02\/2015 17:10"},{"v_sec":-1.24,"tvd":1172.88,"date":"26\/02\/2015 17:11"},{"v_sec":-2.24,"tvd":1220.15,"date":"26\/02\/2015 17:12"},{"v_sec":-3.47,"tvd":1267.47,"date":"26\/02\/2015 17:13"},{"v_sec":-4.65,"tvd":1314.74,"date":"26\/02\/2015 17:14"},{"v_sec":-5.32,"tvd":1362.39,"date":"26\/02\/2015 17:15"},{"v_sec":-5.7,"tvd":1409.81,"date":"26\/02\/2015 17:16"},{"v_sec":-6.08,"tvd":1457.3,"date":"26\/02\/2015 17:17"},{"v_sec":-6.27,"tvd":1505.08,"date":"26\/02\/2015 17:18"},{"v_sec":-6.24,"tvd":1552.59,"date":"26\/02\/2015 17:19"},{"v_sec":-6.38,"tvd":1599.88,"date":"26\/02\/2015 17:20"},{"v_sec":-6.45,"tvd":1647.25,"date":"26\/02\/2015 17:21"},{"v_sec":-6.09,"tvd":1694.81,"date":"26\/02\/2015 17:22"},{"v_sec":-5.52,"tvd":1742.21,"date":"26\/02\/2015 17:23"},{"v_sec":-4.96,"tvd":1789.61,"date":"26\/02\/2015 17:24"},{"v_sec":-4.64,"tvd":1837.06,"date":"26\/02\/2015 17:25"},{"v_sec":-4.58,"tvd":1884.64,"date":"26\/02\/2015 17:26"},{"v_sec":-4.47,"tvd":1932.34,"date":"26\/02\/2015 17:27"},{"v_sec":-4.54,"tvd":1980.08,"date":"26\/02\/2015 17:28"},{"v_sec":-5.44,"tvd":2033.1,"date":"26\/02\/2015 17:29"},{"v_sec":-5.78,"tvd":2046.57,"date":"26\/02\/2015 17:30"},{"v_sec":-5.98,"tvd":2056.01,"date":"26\/02\/2015 17:31"},{"v_sec":-6.09,"tvd":2065.46,"date":"26\/02\/2015 17:32"},{"v_sec":-6.18,"tvd":2074.88,"date":"26\/02\/2015 17:33"},{"v_sec":-6.21,"tvd":2084.24,"date":"26\/02\/2015 17:34"},{"v_sec":-6.09,"tvd":2093.56,"date":"26\/02\/2015 17:35"},{"v_sec":-5.76,"tvd":2102.87,"date":"26\/02\/2015 17:36"},{"v_sec":-5.14,"tvd":2112.16,"date":"26\/02\/2015 17:37"},{"v_sec":-4.35,"tvd":2121.48,"date":"26\/02\/2015 17:38"},{"v_sec":-3.42,"tvd":2130.89,"date":"26\/02\/2015 17:39"},{"v_sec":-2.26,"tvd":2140.13,"date":"26\/02\/2015 17:40"},{"v_sec":-0.78,"tvd":2149.36,"date":"26\/02\/2015 17:41"},{"v_sec":1.02,"tvd":2158.46,"date":"26\/02\/2015 17:42"},{"v_sec":3.26,"tvd":2167.52,"date":"26\/02\/2015 17:43"},{"v_sec":6,"tvd":2176.63,"date":"26\/02\/2015 17:44"},{"v_sec":9.1,"tvd":2185.39,"date":"26\/02\/2015 17:45"},{"v_sec":12.62,"tvd":2193.98,"date":"26\/02\/2015 17:46"},{"v_sec":16.64,"tvd":2202.59,"date":"26\/02\/2015 17:47"},{"v_sec":21.01,"tvd":2210.83,"date":"26\/02\/2015 17:48"},{"v_sec":25.82,"tvd":2218.86,"date":"26\/02\/2015 17:49"},{"v_sec":31.1,"tvd":2226.81,"date":"26\/02\/2015 17:50"},{"v_sec":36.69,"tvd":2234.6,"date":"26\/02\/2015 17:51"},{"v_sec":42.2,"tvd":2242.21,"date":"26\/02\/2015 17:52"},{"v_sec":47.73,"tvd":2250.04,"date":"26\/02\/2015 17:53"},{"v_sec":53.34,"tvd":2257.67,"date":"26\/02\/2015 17:54"},{"v_sec":59.5,"tvd":2265.15,"date":"26\/02\/2015 17:55"},{"v_sec":66.03,"tvd":2272.08,"date":"26\/02\/2015 17:56"},{"v_sec":72.94,"tvd":2278.57,"date":"26\/02\/2015 17:57"},{"v_sec":80.2,"tvd":2284.69,"date":"26\/02\/2015 17:58"},{"v_sec":87.71,"tvd":2290.51,"date":"26\/02\/2015 17:59"},{"v_sec":95.42,"tvd":2295.99,"date":"26\/02\/2015 18:00"},{"v_sec":103.56,"tvd":2301.19,"date":"26\/02\/2015 18:01"},{"v_sec":111.77,"tvd":2305.85,"date":"26\/02\/2015 18:02"},{"v_sec":120.36,"tvd":2310.03,"date":"26\/02\/2015 18:03"},{"v_sec":129.11,"tvd":2313.67,"date":"26\/02\/2015 18:04"},{"v_sec":138.02,"tvd":2316.89,"date":"26\/02\/2015 18:05"},{"v_sec":147.06,"tvd":2319.98,"date":"26\/02\/2015 18:06"},{"v_sec":156.03,"tvd":2323.11,"date":"26\/02\/2015 18:07"},{"v_sec":165,"tvd":2326.21,"date":"26\/02\/2015 18:08"},{"v_sec":174.02,"tvd":2329.17,"date":"26\/02\/2015 18:09"},{"v_sec":183.2,"tvd":2331.96,"date":"26\/02\/2015 18:10"},{"v_sec":192.38,"tvd":2334.37,"date":"26\/02\/2015 18:11"},{"v_sec":201.63,"tvd":2336.31,"date":"26\/02\/2015 18:12"},{"v_sec":211.05,"tvd":2337.84,"date":"26\/02\/2015 18:13"},{"v_sec":220.45,"tvd":2339.08,"date":"26\/02\/2015 18:14"},{"v_sec":229.84,"tvd":2340.05,"date":"26\/02\/2015 18:15"},{"v_sec":239.23,"tvd":2340.73,"date":"26\/02\/2015 18:16"},{"v_sec":248.61,"tvd":2341.23,"date":"26\/02\/2015 18:17"},{"v_sec":258.03,"tvd":2341.63,"date":"26\/02\/2015 18:18"},{"v_sec":267.44,"tvd":2341.93,"date":"26\/02\/2015 18:19"},{"v_sec":276.84,"tvd":2342.04,"date":"26\/02\/2015 18:20"},{"v_sec":286.22,"tvd":2342,"date":"26\/02\/2015 18:21"},{"v_sec":295.62,"tvd":2341.91,"date":"26\/02\/2015 18:22"},{"v_sec":305.04,"tvd":2341.78,"date":"26\/02\/2015 18:23"},{"v_sec":314.43,"tvd":2341.65,"date":"26\/02\/2015 18:24"},{"v_sec":323.82,"tvd":2341.56,"date":"26\/02\/2015 18:25"},{"v_sec":333.18,"tvd":2341.56,"date":"26\/02\/2015 18:26"},{"v_sec":342.58,"tvd":2341.69,"date":"26\/02\/2015 18:27"},{"v_sec":351.99,"tvd":2341.86,"date":"26\/02\/2015 18:28"},{"v_sec":361.33,"tvd":2341.94,"date":"26\/02\/2015 18:29"},{"v_sec":370.69,"tvd":2341.78,"date":"26\/02\/2015 18:30"},{"v_sec":380.1,"tvd":2341.5,"date":"26\/02\/2015 18:31"},{"v_sec":389.53,"tvd":2341.32,"date":"26\/02\/2015 18:32"},{"v_sec":398.96,"tvd":2341.33,"date":"26\/02\/2015 18:33"},{"v_sec":408.53,"tvd":2341.42,"date":"26\/02\/2015 18:34"},{"v_sec":417.98,"tvd":2341.52,"date":"26\/02\/2015 18:35"},{"v_sec":427.68,"tvd":2341.64,"date":"26\/02\/2015 18:36"},{"v_sec":437.09,"tvd":2341.77,"date":"26\/02\/2015 18:37"},{"v_sec":446.79,"tvd":2341.88,"date":"26\/02\/2015 18:38"},{"v_sec":456.26,"tvd":2341.93,"date":"26\/02\/2015 18:39"},{"v_sec":465.7,"tvd":2341.84,"date":"26\/02\/2015 18:40"},{"v_sec":475.09,"tvd":2341.64,"date":"26\/02\/2015 18:41"},{"v_sec":484.48,"tvd":2341.52,"date":"26\/02\/2015 18:42"},{"v_sec":493.92,"tvd":2341.59,"date":"26\/02\/2015 18:43"},{"v_sec":503.34,"tvd":2341.66,"date":"26\/02\/2015 18:44"},{"v_sec":512.8,"tvd":2341.57,"date":"26\/02\/2015 18:45"},{"v_sec":522.22,"tvd":2341.45,"date":"26\/02\/2015 18:46"},{"v_sec":531.65,"tvd":2341.52,"date":"26\/02\/2015 18:47"},{"v_sec":541.12,"tvd":2341.74,"date":"26\/02\/2015 18:48"},{"v_sec":550.61,"tvd":2342.01,"date":"26\/02\/2015 18:49"},{"v_sec":560.05,"tvd":2342.32,"date":"26\/02\/2015 18:50"},{"v_sec":569.52,"tvd":2342.66,"date":"26\/02\/2015 18:51"},{"v_sec":579,"tvd":2343.04,"date":"26\/02\/2015 18:52"},{"v_sec":588.44,"tvd":2343.39,"date":"26\/02\/2015 18:53"},{"v_sec":598.09,"tvd":2343.68,"date":"26\/02\/2015 18:54"},{"v_sec":607.58,"tvd":2344.01,"date":"26\/02\/2015 18:55"},{"v_sec":617.21,"tvd":2344.33,"date":"26\/02\/2015 18:56"},{"v_sec":626.65,"tvd":2344.58,"date":"26\/02\/2015 18:57"},{"v_sec":636.09,"tvd":2344.75,"date":"26\/02\/2015 18:58"},{"v_sec":645.52,"tvd":2344.75,"date":"26\/02\/2015 18:59"},{"v_sec":654.98,"tvd":2344.59,"date":"26\/02\/2015 19:00"},{"v_sec":664.41,"tvd":2344.35,"date":"26\/02\/2015 19:01"},{"v_sec":673.91,"tvd":2344.2,"date":"26\/02\/2015 19:02"},{"v_sec":683.39,"tvd":2344.16,"date":"26\/02\/2015 19:03"},{"v_sec":692.82,"tvd":2344.13,"date":"26\/02\/2015 19:04"},{"v_sec":702.32,"tvd":2344.16,"date":"26\/02\/2015 19:05"},{"v_sec":711.77,"tvd":2344.23,"date":"26\/02\/2015 19:06"},{"v_sec":721.29,"tvd":2344.31,"date":"26\/02\/2015 19:07"},{"v_sec":731.05,"tvd":2344.35,"date":"26\/02\/2015 19:08"},{"v_sec":740.5,"tvd":2344.36,"date":"26\/02\/2015 19:09"},{"v_sec":749.93,"tvd":2344.33,"date":"26\/02\/2015 19:10"},{"v_sec":759.4,"tvd":2344.29,"date":"26\/02\/2015 19:11"},{"v_sec":768.99,"tvd":2344.28,"date":"26\/02\/2015 19:12"},{"v_sec":778.43,"tvd":2344.3,"date":"26\/02\/2015 19:13"},{"v_sec":787.87,"tvd":2344.38,"date":"26\/02\/2015 19:14"},{"v_sec":797.35,"tvd":2344.52,"date":"26\/02\/2015 19:15"},{"v_sec":806.83,"tvd":2344.66,"date":"26\/02\/2015 19:16"},{"v_sec":816.27,"tvd":2344.71,"date":"26\/02\/2015 19:17"},{"v_sec":825.72,"tvd":2344.71,"date":"26\/02\/2015 19:18"},{"v_sec":835.17,"tvd":2344.69,"date":"26\/02\/2015 19:19"},{"v_sec":844.6,"tvd":2344.66,"date":"26\/02\/2015 19:20"},{"v_sec":854.19,"tvd":2344.63,"date":"26\/02\/2015 19:21"},{"v_sec":863.68,"tvd":2344.63,"date":"26\/02\/2015 19:22"},{"v_sec":873.15,"tvd":2344.67,"date":"26\/02\/2015 19:23"},{"v_sec":882.84,"tvd":2344.75,"date":"26\/02\/2015 19:24"},{"v_sec":892.31,"tvd":2344.85,"date":"26\/02\/2015 19:25"},{"v_sec":901.78,"tvd":2344.93,"date":"26\/02\/2015 19:26"},{"v_sec":911.24,"tvd":2344.96,"date":"26\/02\/2015 19:27"},{"v_sec":920.71,"tvd":2344.94,"date":"26\/02\/2015 19:28"},{"v_sec":930.36,"tvd":2344.88,"date":"26\/02\/2015 19:29"},{"v_sec":939.82,"tvd":2344.77,"date":"26\/02\/2015 19:30"},{"v_sec":949.3,"tvd":2344.67,"date":"26\/02\/2015 19:31"},{"v_sec":958.81,"tvd":2344.67,"date":"26\/02\/2015 19:32"},{"v_sec":968.28,"tvd":2344.8,"date":"26\/02\/2015 19:33"},{"v_sec":977.73,"tvd":2344.92,"date":"26\/02\/2015 19:34"},{"v_sec":987.19,"tvd":2345.01,"date":"26\/02\/2015 19:35"},{"v_sec":996.65,"tvd":2345.1,"date":"26\/02\/2015 19:36"},{"v_sec":1006.15,"tvd":2345.19,"date":"26\/02\/2015 19:37"},{"v_sec":1015.61,"tvd":2345.26,"date":"26\/02\/2015 19:38"},{"v_sec":1025.07,"tvd":2345.31,"date":"26\/02\/2015 19:39"},{"v_sec":1034.53,"tvd":2345.33,"date":"26\/02\/2015 19:40"},{"v_sec":1043.98,"tvd":2345.34,"date":"26\/02\/2015 19:41"},{"v_sec":1053.46,"tvd":2345.32,"date":"26\/02\/2015 19:42"},{"v_sec":1062.9,"tvd":2345.31,"date":"26\/02\/2015 19:43"},{"v_sec":1072.36,"tvd":2345.39,"date":"26\/02\/2015 19:44"},{"v_sec":1081.87,"tvd":2345.52,"date":"26\/02\/2015 19:45"},{"v_sec":1091.32,"tvd":2345.59,"date":"26\/02\/2015 19:46"},{"v_sec":1101,"tvd":2345.59,"date":"26\/02\/2015 19:47"},{"v_sec":1110.46,"tvd":2345.56,"date":"26\/02\/2015 19:48"},{"v_sec":1119.91,"tvd":2345.55,"date":"26\/02\/2015 19:49"},{"v_sec":1129.4,"tvd":2345.51,"date":"26\/02\/2015 19:50"},{"v_sec":1138.89,"tvd":2345.44,"date":"26\/02\/2015 19:51"},{"v_sec":1148.38,"tvd":2345.52,"date":"26\/02\/2015 19:52"},{"v_sec":1158.03,"tvd":2345.73,"date":"26\/02\/2015 19:53"},{"v_sec":1167.47,"tvd":2345.92,"date":"26\/02\/2015 19:54"},{"v_sec":1176.91,"tvd":2346.1,"date":"26\/02\/2015 19:55"},{"v_sec":1186.35,"tvd":2346.24,"date":"26\/02\/2015 19:56"},{"v_sec":1195.84,"tvd":2346.23,"date":"26\/02\/2015 19:57"},{"v_sec":1205.31,"tvd":2346.08,"date":"26\/02\/2015 19:58"},{"v_sec":1214.94,"tvd":2346.03,"date":"26\/02\/2015 19:59"},{"v_sec":1224.41,"tvd":2346.14,"date":"26\/02\/2015 20:00"},{"v_sec":1233.87,"tvd":2346.27,"date":"26\/02\/2015 20:01"},{"v_sec":1243.28,"tvd":2346.32,"date":"26\/02\/2015 20:02"},{"v_sec":1252.77,"tvd":2346.32,"date":"26\/02\/2015 20:03"},{"v_sec":1262.18,"tvd":2346.28,"date":"26\/02\/2015 20:04"},{"v_sec":1271.63,"tvd":2346.32,"date":"26\/02\/2015 20:05"},{"v_sec":1281.15,"tvd":2346.51,"date":"26\/02\/2015 20:06"},{"v_sec":1290.6,"tvd":2346.79,"date":"26\/02\/2015 20:07"},{"v_sec":1300,"tvd":2347.11,"date":"26\/02\/2015 20:08"},{"v_sec":1309.42,"tvd":2347.43,"date":"26\/02\/2015 20:09"},{"v_sec":1318.86,"tvd":2347.69,"date":"26\/02\/2015 20:10"},{"v_sec":1328.11,"tvd":2347.75,"date":"26\/02\/2015 20:11"},{"v_sec":1337.52,"tvd":2347.66,"date":"26\/02\/2015 20:12"},{"v_sec":1346.95,"tvd":2347.54,"date":"26\/02\/2015 20:13"},{"v_sec":1356.45,"tvd":2347.47,"date":"26\/02\/2015 20:14"},{"v_sec":1365.9,"tvd":2347.63,"date":"26\/02\/2015 20:15"},{"v_sec":1375.38,"tvd":2347.95,"date":"26\/02\/2015 20:16"},{"v_sec":1384.81,"tvd":2348.23,"date":"26\/02\/2015 20:17"},{"v_sec":1394.28,"tvd":2348.48,"date":"26\/02\/2015 20:18"},{"v_sec":1403.68,"tvd":2348.7,"date":"26\/02\/2015 20:19"},{"v_sec":1413.34,"tvd":2348.91,"date":"26\/02\/2015 20:20"},{"v_sec":1422.76,"tvd":2349.05,"date":"26\/02\/2015 20:21"},{"v_sec":1432.19,"tvd":2349.12,"date":"26\/02\/2015 20:22"},{"v_sec":1441.59,"tvd":2349.16,"date":"26\/02\/2015 20:23"},{"v_sec":1451.02,"tvd":2349.14,"date":"26\/02\/2015 20:24"},{"v_sec":1460.43,"tvd":2349.14,"date":"26\/02\/2015 20:25"},{"v_sec":1469.83,"tvd":2349.16,"date":"26\/02\/2015 20:26"},{"v_sec":1479.19,"tvd":2349.2,"date":"26\/02\/2015 20:27"},{"v_sec":1488.57,"tvd":2349.26,"date":"26\/02\/2015 20:28"},{"v_sec":1498,"tvd":2349.36,"date":"26\/02\/2015 20:29"},{"v_sec":1507.42,"tvd":2349.54,"date":"26\/02\/2015 20:30"},{"v_sec":1516.82,"tvd":2349.79,"date":"26\/02\/2015 20:31"},{"v_sec":1526.23,"tvd":2350.14,"date":"26\/02\/2015 20:32"},{"v_sec":1535.67,"tvd":2350.56,"date":"26\/02\/2015 20:33"},{"v_sec":1545.05,"tvd":2350.86,"date":"26\/02\/2015 20:34"},{"v_sec":1554.51,"tvd":2350.99,"date":"26\/02\/2015 20:35"},{"v_sec":1560.13,"tvd":2351.04,"date":"26\/02\/2015 20:36"},{"v_sec":1575.02,"tvd":2351.23,"date":"26\/02\/2015 20:37"}],  
  "graphs": [{
   "id": "g1",
   "balloonText": "TVD : [[tvd]]<br>V SEC : [[v_sec]]<br /><b>[[date]]</b>",
   "bullet": "round",
   "bulletSize": 2,
   "lineColor": "#d1655d",
   "lineThickness": 2,
   "negativeLineColor": "#637bb6",
   "type": "smoothedLine",
   "xField": "v_sec",
      "yField": "tvd"
  }],
    "chartScrollbar": {
      "offset": 15,
      "scrollbarHeight": 5
    },
  "valueAxes": [{
   "position": "left",
      "reversed": true
  }, {
   "position": "bottom"
  }]

 });

chart.addListener("rendered", zoomChart);
if (chart.zoomChart) {
 chart.zoomChart();
}

function zoomChart() {
 // chart.zoomToIndexes(Math.round(chart.dataProvider.length * .0001), Math.round(chart.dataProvider.length * 1));
}
#chartdiv {
  width: 100%;
  height: 500px;
  font-size: 11px;
}
<script src="http://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="http://www.amcharts.com/lib/3/xy.js"></script>
<script src="http://www.amcharts.com/lib/3/themes/light.js"></script>
<div id="chartdiv"></div>

这里是 Codepen version of it