* UIBarChartEx:跳转横坐标文字旋转后的位置

This commit is contained in:
Sunny 2020-12-09 21:40:36 +08:00
parent 858df6a7e2
commit 1ac3186c8c
4 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -584,7 +584,7 @@ namespace Sunny.UI
float w = DrawSize.Width * data.Data.Count * 1.0f / DataCount;
SizeF sf = g.MeasureString(data.Name, SubFont);
if (Option.XAxis.AxisLabel.Angle != 0)
g.DrawString(data.Name, SubFont, ChartStyle.ForeColor, new PointF(start + w / 2.0f - sf.Width / 2.0f, DrawOrigin.Y + Option.Grid.Bottom / 2.0f),
g.DrawString(data.Name, SubFont, ChartStyle.ForeColor, new PointF(start + w / 2.0f - 10, DrawOrigin.Y + Option.Grid.Bottom / 2.0f),
new StringFormat() { Alignment = StringAlignment.Center }, (3600 - Option.XAxis.AxisLabel.Angle) % 360);
else
g.DrawString(data.Name, SubFont, ChartStyle.ForeColor, start + w / 2.0f - sf.Width / 2.0f, DrawOrigin.Y + Option.XAxis.AxisTick.Length + Option.XAxis.AxisTick.Distance);
@ -598,7 +598,7 @@ namespace Sunny.UI
{
SizeF sf = g.MeasureString(data.Name, SubFont);
if (Option.XAxis.AxisLabel.Angle != 0)
g.DrawString(data.Name, SubFont, ChartStyle.ForeColor, new PointF(start - sf.Width / 2.0f, DrawOrigin.Y + Option.Grid.Bottom / 2.0f),
g.DrawString(data.Name, SubFont, ChartStyle.ForeColor, new PointF(start - 10, DrawOrigin.Y + Option.Grid.Bottom / 2.0f),
new StringFormat() { Alignment = StringAlignment.Center }, (3600 - Option.XAxis.AxisLabel.Angle) % 360);
else
g.DrawString(data.Name, SubFont, ChartStyle.ForeColor, start - sf.Width / 2.0f, DrawOrigin.Y + Option.XAxis.AxisTick.Length + Option.XAxis.AxisTick.Distance);

View File

@ -32,7 +32,7 @@ namespace Sunny.UI
[DefaultEvent("ValueChanged")]
[DefaultProperty("Text")]
[ToolboxItem(true)]
public sealed class UICheckBox : UIControl
public class UICheckBox : UIControl
{
public UICheckBox()
{

View File

@ -31,7 +31,7 @@ namespace Sunny.UI
{
[DefaultEvent("Click")]
[DefaultProperty("Text")]
public sealed class UISymbolButton : UIButton
public class UISymbolButton : UIButton
{
private int _symbolSize = 24;
private int _imageInterval = 2;