using System; using System.Collections.Generic; using System.Text; using System.Drawing; namespace TChart.ImageChart { /// /// 走势图的X轴数据 /// /// /// 作者: Kingthy /// 日期: 2007-09-11 /// MSN: Kingthy@gmail.com /// 转载请注明原作者,当你有更新修改时如果方便的希望能发一份给我.谢谢 /// public class XAxisItem { /// /// /// /// public XAxisItem(string title) { this.Title = title; this.Value = 0; this.TitleColor = Color.Black; this.TitleFont = new Font(new FontFamily("Arial"), 9, FontStyle.Regular); this.DrawColor = Color.Red; this.ValueColor = Color.Black; this.ValueFont = new Font(new FontFamily("Arial"), 9, FontStyle.Regular); this.ValueVisible = true; } /// /// /// /// /// public XAxisItem(string title, decimal value) { this.Title = title; this.Value = value; this.TitleColor = Color.Black; this.TitleFont = new Font(new FontFamily("Arial"), 9, FontStyle.Regular); this.DrawColor = Color.Red; this.ValueColor = Color.Black; this.ValueFont = new Font(new FontFamily("Arial"), 9, FontStyle.Regular); this.ValueVisible = true; } private string m_Title; /// /// 标题 /// public string Title { get { return m_Title; } set { m_Title = value; } } private decimal m_Value; /// /// 值 /// public decimal Value { get { return m_Value; } set { m_Value = value; } } private Color m_TitleColor; /// /// 标题的颜色 /// public Color TitleColor { get { return m_TitleColor; } set { m_TitleColor = value; } } private Font m_TitleFont; /// /// 标题的字体 /// public Font TitleFont { get { return m_TitleFont; } set { m_TitleFont = value; } } private Color m_ValueColor; /// /// 值的颜色 /// public Color ValueColor { get { return m_ValueColor; } set { m_ValueColor = value; } } private Font m_ValueFont; /// /// 值的字体 /// public Font ValueFont { get { return m_ValueFont; } set { m_ValueFont = value; } } private Color m_DrawColor; /// /// 绘制颜色 /// public Color DrawColor { get { return m_DrawColor; } set { m_DrawColor = value; } } private bool m_ValueVisible; /// /// 值是否可见 /// public bool ValueVisible { get { return m_ValueVisible; } set { m_ValueVisible = value; } } /// /// 克隆自身 /// /// public XAxisItem Clone() { XAxisItem item = new XAxisItem(this.Title, this.Value) { TitleColor = this.TitleColor, TitleFont = new Font(new FontFamily(this.TitleFont.Name), this.TitleFont.Size, this.TitleFont.Style), ValueColor = this.ValueColor, ValueVisible = this.ValueVisible, ValueFont = new Font(new FontFamily(this.ValueFont.Name), this.ValueFont.Size, this.ValueFont.Style), DrawColor = this.DrawColor }; return item; } } }