Zedgraph 符号.fill
在 Zedgraph 中,我无法填满我的圈子 - 尽管我认为我已经复制了文档。有人知道为什么吗?
myCurve[j] = myPane.AddCurve(SerNames[j], list[j], colours[j], SymbolType.None);
myCurve[j].Line.IsVisible = false;
myCurve[j].Symbol.Type = SymbolType.Circle;
myCurve[j].Symbol.Size = 4.0F;
myCurve[j].Symbol.Border.Width = 2.0F;
myCurve[j].Symbol.Border.Color = Color.Red;
myCurve[1].Symbol.Fill = new Fill(Color.Red);
//myCurve[1].Symbol.Fill.IsVisible = true;
myCurve[1].Symbol.Fill.Type = FillType.Solid;
In Zedgraph I am unable to get my circle filled - even though I think I have copied the docs. Anyone know why?
myCurve[j] = myPane.AddCurve(SerNames[j], list[j], colours[j], SymbolType.None);
myCurve[j].Line.IsVisible = false;
myCurve[j].Symbol.Type = SymbolType.Circle;
myCurve[j].Symbol.Size = 4.0F;
myCurve[j].Symbol.Border.Width = 2.0F;
myCurve[j].Symbol.Border.Color = Color.Red;
myCurve[1].Symbol.Fill = new Fill(Color.Red);
//myCurve[1].Symbol.Fill.IsVisible = true;
myCurve[1].Symbol.Fill.Type = FillType.Solid;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题可能出在所提供的代码示例之外。一件奇怪的事情是,当您将曲线添加到窗格时,您指定了
SymbolType.None
,但两行后它被设置为SymbolType.Circle
。这不应该导致填充问题,但我仍然会将原始符号类型更改为所需类型并消除冗余行。接下来,我假设您在窗格中添加了许多曲线,但只想在
myCurve[1]
上显示实心圆。如果其他曲线之一位于 1 的顶部,并且数据点位于完全相同的位置,则这些圆圈将隐藏填充的圆圈。您可能希望使用Move()
方法:The problem may lie outside the code sample provided. One thing that stands out as odd is that when you add the curve to the pane, you specify
SymbolType.None
, yet two lines later it is set toSymbolType.Circle
. This should not cause a fill problem, but I would still change the original symbol type to the desired type and eliminate the redundant line.Next, I presume you have many curves added to the pane, but only want solid circles on
myCurve[1]
. If one of the other curves is in on top of 1, and has data points in the exact same location, those circles will hide the filled ones. You might want to guarantee thatmyCurve[1]
is in the foreground, using theMove()
method: