【问题标题】:How to set horizontal and vertical heading along with MS Chart X axis and Y axis?如何设置水平和垂直标题以及 MS Chart X 轴和 Y 轴?
【发布时间】:2014-04-05 10:37:26
【问题描述】:

我正在使用 c# .Net - windows 应用程序中的图表控件,它易于使用,但自定义有点困难,或者格式化有点乏味。

我已经完成了图表,但我想显示水平和垂直箭头线以及其中的一些文字,例如我发布了一张图片:

如果图表控件对此有一些属性,请告诉我。非常感谢。

【问题讨论】:

    标签: c# .net window bar-chart mschart


    【解决方案1】:

    终于找到了显示方式:

     chart1.ChartAreas["ChartArea1"].AxisX.Title = "Test Number sorted by Date";
     chart1.ChartAreas["ChartArea1"].AxisX.TitleFont = new Font("Sans Serif", 10, FontStyle.Bold);
     chart1.ChartAreas["ChartArea1"].AxisY.Title = "Percentage Obtained";
     chart1.ChartAreas["ChartArea1"].AxisY.TitleFont = new Font("Sans Serif", 10, FontStyle.Bold);
    

    现在图表看起来像:

    【讨论】:

      【解决方案2】:

      即使下面的代码也可以工作。检查一下
      <ChartAreas> <asp:ChartArea Name="ChartArea1"> <AxisX Title="Test Number Sorted By Date"></AxisX> <AxisY Title="Percentage Obtained"></AxisY> </asp:ChartArea> </ChartAreas>

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-05-13
        • 2020-01-15
        • 1970-01-01
        • 2019-10-20
        • 1970-01-01
        相关资源
        最近更新 更多