ZedGraph PointPairs 仅 1 个符号
我希望有人能找到这个问题的答案,
我已经在 ZedGraph 图中添加了一些“PointPair”值,这一切都工作正常。但是,当我显示符号时,它只显示高值上的符号,而不显示低值。
有谁知道这可能是什么原因造成的?
编辑 - 代码示例(抱歉,我应该把它放在昨天)
// GraphPane pane (field)
FilledLineItem filledLineItem = new FilledLineItem("myline", upperPoints, lowerPoints, Color.DodgerBlue, ZedGraph.SymbolType.Square)
pane.CurveList.Add(filledLineItem);
其中 upperPoints 和 lowerPoints 的类型为 PointPairList
I'm hoping someone may have the answer to this one
I've added some "PointPair" values to a ZedGraph graph, and this all works fine. However, when I show Symbols, it only shows the symbol on the high value, not the low value.
Does anyone know what could be causing this?
EDIT - Code Sample (sorry, I should've put this on yesterday)
// GraphPane pane (field)
FilledLineItem filledLineItem = new FilledLineItem("myline", upperPoints, lowerPoints, Color.DodgerBlue, ZedGraph.SymbolType.Square)
pane.CurveList.Add(filledLineItem);
Where upperPoints and lowerPoints are of type PointPairList
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 ZedGraph 库中发现了这个问题...如果我错过了一些我不应该拥有的东西,请纠正我。
当使用 FilledLineItem 时,它有一组上限点和下限点。
当调用“Draw”时,它是在 LineItem 类上调用的 - 该类只有一组点。
所以我在Draw方法中添加了:
DrawPoints是我从“Symbol”中的“Draw”方法中提取出来的方法。它包含以下内容
所以我的“Draw”方法现在看起来像这样:
...在将曲线转换为 FilledLineItem 之后(但不是在检查它实际上是 FilledLineItem 之前)。
这已经解决了这个问题,我希望它可以帮助其他可能遇到同样问题的人。
I have discovered the problem in the ZedGraph library...someone please correct me if I've missed something I shouldn't have
When using a FilledLineItem, this has a set of upper points and lower points.
When "Draw" is called, it is called on the LineItem class - which only has a set of points.
So I have added to the Draw method:
DrawPoints is a method that I extracted out of the "Draw" method in "Symbol". It contains the following
So my "Draw" method now looks like this:
...after casting the curve to a FilledLineItem (but not before checking that it is actually a FilledLineItem).
This has fixed the problem, and I hope it helps anyone else who may have the same problem.