误差栏独立地改变彼此的上,下和中心错误误差、错误、中心

2023-09-06 11:37:14 作者:说你是猪人家猪都不乐意

这是随机配备在.NET中的图表似乎有一些pretty的整洁的功能(免费的!),但我不能找到一种方法来设置的误差线的上,下和中心标记。我可以将其设置为 StandardError的固定误差(N) StandardDeviation 百分比(N),但我不能找到一种方法来指定的这个的一点是100,下上限误差错误是65和中心点是98。用例是我在欺骗和利用误差线显示最小,最大和平均的特定值,以及一列系列的的的值。

The charting that's included in .NET seems to have some pretty neat features (For free!), but I can't find a way to set the upper, lower and center markers on the error bars. I can set it to StandardError, FixedError(n), StandardDeviation or Percentage(n), but I can't find a way to specify that the Upper Error for this point is 100, the Lower Error is at 65 and the Center Point is at 98. The use-case is that I'm cheating and using error bars to display the Min, Max and Mean for a specific value as well as a Column series for your value.

seriesErrors("ErrorBarSeries") = "DataSeries"
seriesErrors("ErrorBarType") = "StandardError"
seriesErrors("ErrorBarStyle") = "Both"
seriesErrors("ErrorBarCenterMarkerStyle") = "Line"

这可憎的命名空间是 System.Windows.Forms.DataVisualization.Charting

正如你可能会通过使用括号告诉指定的集合,这是在VB.Net,但我敢肯定,C#是有同样的限制,那就是我很困惑的对象。

As you can probably tell by the use of parentheses to specify a collection, this is in VB.Net, although I'm sure C# is having the same limitation as it's the object that I'm confused with.

谢谢!

推荐答案

想通了。很显然,你需要 Series.Points.AddXY(与xValue,CenterMarkerInErrorBar,LowerBoundsInErrorBar,UpperBoundsInErrorBar) ..但是,这并没有记录任何地方,我能找到微软。

Figured it out. Apparently, you need to Series.Points.AddXY(xValue, CenterMarkerInErrorBar, LowerBoundsInErrorBar, UpperBoundsInErrorBar) .. But that wasn't documented anywhere that I could find from Microsoft.

另外,如果你看到上面的信息,您不能使用前两行,他们会打破错误吧..不知。最后两行和code在这一职位将做工精细,虽然。

Also, if you see the above information, you can't use the first two lines, as they'll break the error bars .. somehow. The last two lines and the code in this post will work fine, though.

特别感谢MSChart C#错误条形图动态上限和下限的答案!