How to give custom labels to x axis of chart control?
来源:互联网 发布:上市公司高管薪酬数据 编辑:程序博客网 时间:2024/05/21 14:58
I am creating a windows project in which there is a requirement to plot a graph, for that i am using chart control.
The X-Axis of chart control has label from 0 to 100 with following code.
down vote
Following is the solution of my question.
string[] monthNames = { "100", "75" , "50" , "25" ,"0"};int startOffset = -2;int endOffset = 2;foreach (string monthName in monthNames){ CustomLabel monthLabel = new CustomLabel(startOffset, endOffset, monthName, 0, LabelMarkStyle.None); chart1.ChartAreas[0].AxisX.CustomLabels.Add(monthLabel); startOffset = startOffset + 25; endOffset = endOffset + 25;}
down vote
Following is the solution of my question.
string[] monthNames = { "100", "75" , "50" , "25" ,"0"};int startOffset = -2;int endOffset = 2;foreach (string monthName in monthNames){ CustomLabel monthLabel = new CustomLabel(startOffset, endOffset, monthName, 0, LabelMarkStyle.None); chart1.ChartAreas[0].AxisX.CustomLabels.Add(monthLabel); startOffset = startOffset + 25; endOffset = endOffset + 25;}
0 0
- How to give custom labels to x axis of chart control?
- Use X++ to control word drawing Chart
- How to set the width of columns?about chart control for .net
- How to set custom colors in amCharts Column Chart
- Using labels to give semantics to tags学习笔记
- How To Embedded StyleSheet File with Custom Control.
- HOW TO Custom DSDT
- Labels (how to label visited cells)
- How to access body of Custom tags in JSP tutorial
- how to download ActivePython !give U Address!
- How to give a good talk?
- how-to-use-custom-cursors
- How to custom RedHat DVD
- How to add custom scripts
- How To Change the Background Color of a Tab Control
- How to get control of your time and your life
- how to get the value of an control
- How to get control of your time and life
- HDU 3682 To Be an Dream Architect (STL去重--思路题目)
- 一步一步解析java集合框架HashMap源码(1)
- html5 sqlite(Web SQL)
- HDU 4651 数学 五边形数定理
- hdu5790 Prefix(Trie树+主席树)
- How to give custom labels to x axis of chart control?
- ceph存储 ceph源码调试中admin_socket接口
- 华为 删数
- UNIX环境高级编程——学习路线图
- 通过cmd后去keystore的SHA1指纹
- Dex文件格式详解
- Intent实现页面的跳转
- Android6.0权限管理被忽略问题
- c# Chart设置样式