* UILineChart:更新X轴坐标文字格式化自定义格式化字符串
This commit is contained in:
parent
e8a78979af
commit
325a384b4f
BIN
Bin/SunnyUI.dll
BIN
Bin/SunnyUI.dll
Binary file not shown.
@ -180,9 +180,19 @@ namespace Sunny.UI
|
||||
{
|
||||
string label;
|
||||
if (Option.XAxisType == UIAxisType.DateTime)
|
||||
label = new DateTimeInt64(XLabels[i]).ToString(XScale.Format);
|
||||
{
|
||||
if (Option.XAxis.AxisLabel.AutoFormat)
|
||||
label = new DateTimeInt64(XLabels[i]).ToString(XScale.Format);
|
||||
else
|
||||
label = new DateTimeInt64(XLabels[i]).ToString(Option.XAxis.AxisLabel.DateTimeFormat);
|
||||
}
|
||||
else
|
||||
label = XLabels[i].ToString(XScale.Format);
|
||||
{
|
||||
if (Option.XAxis.AxisLabel.AutoFormat)
|
||||
label = XLabels[i].ToString(XScale.Format);
|
||||
else
|
||||
label = new DateTimeInt64(XLabels[i]).ToString("F" + Option.XAxis.AxisLabel.DecimalCount);
|
||||
}
|
||||
|
||||
SizeF sf = g.MeasureString(label, SubFont);
|
||||
g.DrawString(label, SubFont, ChartStyle.ForeColor, x - sf.Width / 2.0f, DrawOrigin.Y + Option.XAxis.AxisTick.Length);
|
||||
|
Loading…
x
Reference in New Issue
Block a user