根据相关值连接 Silverlight Line 系列点
这是我当前的图表:
是否可以根据依赖关系获得绿色和红色系列来连接点值(TVD)而不是独立值(压力)?
我想根据 TVD 的增加来连接这些点。
我的系列绑定到对象列表中找到的值。对象列表根据 TVD 的增加进行排序,但是当我将列表绑定到系列时,点根据压力的增加进行连接。
Here's my current chart:
Is it possible to get the green and red series to connect points based on the dependent value (TVD) and not the independent value (Pressure)?
I'd like to connect the points based on the increase in TVD.
My series are bound to values found in a list of objects. The list of objects is sorted based on the increase in TVD, but when I bind my list to the series, the points connect based on increase in pressure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我猜你的独立轴(压力)设置为X方向,从属轴(TVD)设置为Y方向。
通过将独立轴设置为TVD值并将其方向设置为Y,您应该能够获得所需的结果然后压力值将进入具有 X 方向的从属轴。
I guess your Independent Axis (Pressure) is set to orientation X, and the Dependent Axis (TVD) is orientaton Y.
You should be able to get the results you want by setting the Independent Axis to the TVD value, and its orientation to Y. The pressure values would then go onto the Dependent Axis with orientation X.
我大胆猜测这是不可能的。
我能够重现按 X 顺序对点进行排序的图表。事实上,看起来 LineSeries 类(或者更确切地说是它的超类,LineAreaSeriesBase,源),将点保留在按独立值排序的集合中。因此,LineSeries 将完全忽略您提供点的顺序。
我尝试的下一件事是交换 X 轴和 Y 轴。我尝试了一些我认为可行的方法,但最终我得到的只是“分配的独立轴无法使用”异常。 Google 大约一年前在 MSDN 论坛上发现了这篇文章,其中另一个用户提出同样的问题,但没有得到任何有用的答案。
如果您确实想要一个按 TVD 顺序绘制点的图表,那么我不得不建议放弃 Silverlight Toolkit 图表并使用第三方控件。每次我尝试使用 Silverlight Toolkit 图表时,我都会遇到问题或不灵活。在我看来,它对于生产用途来说还不够好。您显然在石油行业工作,所以他们并不是买不起几百美元来购买这些库之一的许可证。
I would hazard a guess that it isn't possible.
I was able to reproduce the chart sorting the points in X order. Indeed, it seems the LineSeries class (or rather its superclass, LineAreaSeriesBase, source), keeps the points in a collection ordered by independent value. So, the LineSeries will completely ignore the order in which you supply the points.
The next thing I tried was swapping the X and Y axes. I tried a few things that I thought would work but in the end all I got was an 'Assigned independent axis cannot be used' exception. Google turned up this post on the MSDN forums about a year ago, in which another user asks the same question and gets no helpful answers.
If you really want a chart plotting points in order of TVD, then I would have to recommend abandoning the Silverlight Toolkit chart and using a third-party control instead. Every time I've attempted to use the Silverlight Toolkit chart I've run up against an issue or an inflexibility with it. In my opinion it's just not good enough for production use. You're evidently working for the oil industry, so it's not like they can't afford a few hundred dollars for a licence for one of these libraries.