199 lines
4.7 KiB
C#
199 lines
4.7 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Drawing;
|
|||
|
|
namespace TChart.ImageChart
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>X<EFBFBD><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <remarks>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>: Kingthy
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>: 2007-09-11
|
|||
|
|
/// MSN: Kingthy@gmail.com
|
|||
|
|
/// ת<><D7AA><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><D0B8><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD>ܷ<EFBFBD>һ<EFBFBD>ݸ<EFBFBD><DDB8><EFBFBD>.лл
|
|||
|
|
/// </remarks>
|
|||
|
|
public class XAxisItem
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
///
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="title"></param>
|
|||
|
|
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;
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
///
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="title"></param>
|
|||
|
|
/// <param name="value"></param>
|
|||
|
|
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;
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public string Title
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return m_Title;
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
m_Title = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private decimal m_Value;
|
|||
|
|
/// <summary>
|
|||
|
|
/// ֵ
|
|||
|
|
/// </summary>
|
|||
|
|
public decimal Value
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return m_Value;
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
m_Value = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private Color m_TitleColor;
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|||
|
|
/// </summary>
|
|||
|
|
public Color TitleColor
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return m_TitleColor;
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
m_TitleColor = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private Font m_TitleFont;
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public Font TitleFont
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return m_TitleFont;
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
m_TitleFont = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private Color m_ValueColor;
|
|||
|
|
/// <summary>
|
|||
|
|
/// ֵ<><D6B5><EFBFBD><EFBFBD>ɫ
|
|||
|
|
/// </summary>
|
|||
|
|
public Color ValueColor
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return m_ValueColor;
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
m_ValueColor = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private Font m_ValueFont;
|
|||
|
|
/// <summary>
|
|||
|
|
/// ֵ<><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public Font ValueFont
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return m_ValueFont;
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
m_ValueFont = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private Color m_DrawColor;
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|||
|
|
/// </summary>
|
|||
|
|
public Color DrawColor
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return m_DrawColor;
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
m_DrawColor = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private bool m_ValueVisible;
|
|||
|
|
/// <summary>
|
|||
|
|
/// ֵ<>Ƿ<EFBFBD><C7B7>ɼ<EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public bool ValueVisible
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return m_ValueVisible;
|
|||
|
|
}
|
|||
|
|
set
|
|||
|
|
{
|
|||
|
|
m_ValueVisible = value;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>¡<EFBFBD><C2A1><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
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;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|