using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Muchinfo.MTPClient.Data.Model.Analysis
{
public class SubPriceData
{
///
/// 价格
///
public decimal Price { get; set; }
///
/// 成交量
///
public long CompleteQte
{
get;
set;
}
///
/// 总成交量
///
public decimal TotalQte
{
get;
set;
}
///
/// 柱形图长度
///
public double Width
{
get { return Convert.ToDouble(CompleteQte / 2) < 3 ? 3 : Convert.ToDouble(CompleteQte / 2); }
}
///
/// 占比
///
public string Scale
{
get
{
if (TotalQte == 0)
{
return "0%";
}
decimal scale = CompleteQte / TotalQte * 100;
if (scale < 0)
{
scale = 0;
}
return scale.ToString("f2") + "%";
}
}
}
}