amcharts只显示3个值

时间:2018-08-05 00:16:30

标签: amcharts

我当前正在尝试使用amcharts显示一些数据,但是当我将parseDates设置为true

我正在使用的数据如下:

var data = [{"Name":"ragg","Title":"Test","Median":15,"Reference":"chrom","CreatedAt":"2018-08-05T00:11:29Z","UpdatedAt":"2018-08-05T00:11:29Z"}]

这就是我创建图形的方式:

var chart = AmCharts.makeChart("chart-alch", {
  "type": "serial",
  "theme": "black",
  "marginRight": 80,
  "autoMarginOffset": 20,
  "marginTop": 7,
  "dataProvider": data,
  "valueAxes": [{
      "axisAlpha": 0.2,
      "dashLength": 1,
      "position": "left"
  }],
  "mouseWheelZoomEnabled": false,
  "graphs": [{
      "id": "g1",
      "balloonText": "[[value]]",
      "bullet": "round",
      "bulletBorderAlpha": 1,
      "bulletColor": "#FFFFFF",
      "hideBulletsCount": 50,
      "title": "red line",
      "valueField": "Median",
      "useLineColorForBulletBorder": true,
      "balloon":{
          "drop":true
      }
  }],
  "chartScrollbar": {
      "autoGridCount": false,
      "graph": "g1",
      "scrollbarHeight": 40
  },
  "chartCursor": {
     "limitToGraph":"g1"
  },
  "dataDateFormat": "YYYY-MM-DDTHH:NN:SSZ",
  "categoryField": "CreatedAt",
  "categoryAxis": {
      "parseDates": true,
      "axisColor": "#DADADA",
      "dashLength": 5,
      "minorGridEnabled": false,
      "minPeriod": "5ss"
  },
  "export": {
      "enabled": true
  }
});

但是,即使我在数据数组中有50多个项目,如果我使用parseDates,病也只会在图表上显示3个项目。

0 个答案:

没有答案