使用amCharts对齐中心图

时间:2012-10-03 13:29:43

标签: charts amcharts

enter image description here

我有这个图,由引擎amCharts构建,我有3个类型字段和3个图

  • 黄色
  • 绿色
  • 蓝色

     var graph1 = new AmCharts.AmGraph();
     graph1.type = "column";
     graph1.valueField = "yellow";
     chart.addGraph(graph1);
    
     var graph2 = new AmCharts.AmGraph();
     graph2.type = "column";
     graph2.valueField = "yellow";
     chart.addGraph(graph2);
    
     var graph3 = new AmCharts.AmGraph();
     graph3.type = "column";
     graph3.valueField = "yellow";
     chart.addGraph(graph3);
    

正如您所看到的,我在5月份没有黄色数据,5月没有绿色数据。

我希望每个月的列都与下一个对齐

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以更改CSS文件中的x值 像这样的.amcharts-graph-column-element {x:0.3}