调整轴大小并添加恒定线
我正在创建一个仪表板,其中包含我正在构建的应用程序的一些报告(使用 Telerik Reporting),
我遇到了 2 个问题: 第一个是 - 我有一些图表值,有时是正数,有时是负数 - 如果数据既是负数又是正数 - 自动缩放功能工作得很好,但如果所有数据都是负数 - 我仍然想设置上边框y 轴的值大于 0,我该怎么办? (在某些情况下自动缩放,在其他情况下手动上边框)
第二个问题 - 我已经创建了一个点图,我希望在 0 值处有一条硬编码的“线”(我希望某些点超过 0 并且有些在下面 - 0 应该一直在那里,只是一条恒定线) - 我可以这样做吗???如果是这样,怎么办?
提前致谢。
I am creating a dashboard with some reports for an application i am building(using Telerik Reporting),
I've come across 2 questions:
The first being - i have some chart values which are sometimes positive and sometimes negative - if the data is both negative and positive - the autoscale feature works just fine, But if all data is negative - i'd still want to set the upper border of the yaxis to be something higher then 0, How would i go about this? (Autoscale on some cases, manual upper border on others)
Second question - i've craeted a point graph and i'd like to have a hardcoded "Line" at the 0 value (i'd like some points to be over 0 and some to be under - and the 0 should allways be there, just a constant line) - can i do that??? if so, how??
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个问题 -
“一个可能的解决方法是连接 RadChart 的 ItemDataBound 事件并跟踪绘制的最小值和最大值(可通过 e.SeriesItem.YValue 获得)。然后,根据它们与基线值的比较,您可以决定是否保留自动缩放功能(即如果基线值介于最小值和最大值之间)或将自动缩放设置为 false 并手动定义轴范围,以便标记区域可见。”
-每个 Telerik 员工有条件地保留或关闭 AutoScale
第二个问题 -
您想要使用 标记区域(如上所述)。它们位于 PlotArea.MarkedZones 下。在集合内添加一个区域,并将 ValueStartY 设置为 -1,将 ValueEndY 设置为 1。
这基本上是 Telerik 版本的 StripLine,它是一条实线,您可以将其添加到普通 SSRS 报告中。
First Question -
"A possible workaround would be to wire the ItemDataBound event of RadChart and keep track of the min and max value plotted (available through e.SeriesItem.YValue). Then, depending on their values compared to the baselineValue you can decide whether to keep the AutoScale feature (that would be if baselineValue is between min and max) or set AutoScale to false and manually define the axis range so that the marked zone is visible."
-Per Telerik Employee as to conditionally keep or turn off AutoScale
Second Question -
You want to use marked zones (mentioned above). They are located under PlotArea.MarkedZones. Inside the collection add a zone and set the ValueStartY to -1 and the ValueEndY to 1.
This is basically Telerik's version of a StripLine which is a solid line you can add to normal SSRS reports.