【问题标题】:how to Set Minimum and maximum values for column charts in asp.net chart item control如何在asp.net图表项控件中设置柱形图的最小值和最大值
【发布时间】:2011-08-01 05:24:49
【问题描述】:

我的图表控件有问题

问题:我如何在绘制图表时动态更改图表的轴..? 我想调整轴,使 x 轴最小值是我想用它开始图表并关闭直到我需要的最大值..?

仅供参考,我使用的图表类型是 COLUMN。

那么请告诉我我应该如何尝试..?

我尝试动态设置最小值和最大值属性,但它们只采用双精度类型,但根据我要显示的数据,我是什么日期类型。

提前谢谢你

如果可能,请将您的答案发送至 rajekasani05@gmail.com

谢谢 RK

【问题讨论】:

    标签: c# asp.net controls charts


    【解决方案1】:

    您可以将积分集合绑定到 DateTime 列表或您希望的任何内容:

    IList<DateTime> listx = new List<DateTime>();
    IList<double> listy = new List<double>();
    
    //iterate and add your values to the two lists: listx and listy
    
    //when you're done, bind the lists to the points collection
    yourSeries.Points.DataBindXY(listx, listy);
    

    希望这会有所帮助:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-26
      • 2023-03-03
      • 2012-06-29
      相关资源
      最近更新 更多