如:用adodataset做
select continent, count(continent) from country
group by continent在dbchart里的,只能选统计出的值,不能选前面的名称,这样图例就没有了,
如:应该是:
      south american  7
      north american  11结果:7   7
      11  11就是名称不让选
怎么办啊?

解决方案 »

  1.   

    可以的:
    如果是TBarSeries:
    Barseries1.Active:=False;
    chart.Legend.LegendStyle:=LsAuto;
    BarSeries1.DataSource:=你的DataSet
    BarSeries1.XLabelsSource:=Continent
    YBarSeries1.Values.ValueSource:=ContinentCount 字段
    Barseries1.Active:=True;
      

  2.   

    自己琢磨一下,先用静态的做,功能实现之后,右键view as text看看动态的语句怎么写
      

  3.   

    自己琢磨一下,先用静态的做,功能实现之后,右键view as text看看动态的语句怎么写