zoukankan      html  css  js  c++  java
  • 给X轴添加滚动条,放大X轴Y轴

    见Dundas自带的Chart Features->Axis->Scrolling and zooming示例,

    首先引用下面语句

    using Dundas.Charting.WebControl;
    ...
    若在自己的代码中若是单击按钮后显示图表,则将里面的代码写到按钮事件中
    private void Page_Load(object sender, System.EventArgs e)
    {
    
        // scrolling and zooming will force keeping of series data between callbacks.
        this.Chart1.ChartAreas["Default"].CursorX.UserEnabled = true;
    
        // Set restriction on how far the user can zoom in
        this.Chart1.ChartAreas["Default"].AxisX.View.MinSize = 5;
        
        // Check AJAXZoomEnabled property.
        if (CheckBoxAJAXZoomEnabled.Checked)
        {
            Chart1.AJAXZoomEnabled = true;
        }
        else
        {
            Chart1.AJAXZoomEnabled = false;
        }
        
        if (!this.Page.IsPostBack)
        {
            // Set initial X axis zooming
            this.Chart1.ChartAreas["Default"].AxisX.View.Position = 10.0;
            this.Chart1.ChartAreas["Default"].AxisX.View.Size = 25.0;
            
            // populate data here...
        
        }
    }
    ...
    
  • 相关阅读:
    黑松白鹿
    跨越
    第三年
    Lua windows环境搭建
    Iron man
    水果沙拉
    六周岁
    sqlserver数据库附加报错5120
    [BeiJing2006]狼抓兔子 平面图最小割
    BZOJ2118: 墨墨的等式 思维建图
  • 原文地址:https://www.cnblogs.com/enjoyprogram/p/2144325.html
Copyright © 2011-2022 走看看