在chartplotter中获取水平轴的开始和结束的当前值(动态数据显示) [英] get current values of start and end for horizontal axis in chartplotter (dynamic data display)
问题描述
我正在使用d3 chartplotter。在我的应用程序中,我希望程序自动检测显示的水平轴的当前开始和结束值。例如,让我们说用户放大绘制的数据。我知道轴值会自动调整并显示在绘图仪上。我想要的是(在点击按钮时),程序应该提取当时显示的X轴的起点和终点值。我需要这两个值来做其他事情。我正在使用C#wpf来编程btw。我尝试在论坛中搜索它,但到目前为止没有运气。这就是我所拥有的,包括我最终希望程序做的一些伪代码。但不确定如何进一步实现我的目标。
CursorCoordinateGraph coordinategraph = 新 CursorCoordinateGraph(); plotter.Children.Add(coordinategraph);
on some_buttonclick()
{检索显示的第一个和最后一个x坐标值}}
非常感谢正确方向的任何指针。
谢谢!
我弄清楚了。碰巧太简单了:)
var v = plotter。可见;
int X_left = Convert.ToInt32(v.Left);
int X_right = Convert.ToInt32(v.Right);
I am working with d3 chartplotter. In my application, I want the program to automatically detect the current start and end values of my horizontal axis on display. For example, let us say the user zooms in the data plotted. I know the axis value will be automatically adjusted and displayed on the plotter. What I want is (upon a button click maybe), the program should extract what is the start and end value of the X-axis on display at that moment. I need these two values to do some other thing. I am using C# wpf for programming btw. I tried searching for it in forums, but no luck so far. Here's what I have including some pseudocode for what i eventually want the program to do. But not sure how to get any further to achieve my objective.
CursorCoordinateGraph coordinategraph = new CursorCoordinateGraph(); plotter.Children.Add(coordinategraph);
Upon some_buttonclick()
{ Retrieve the first and last x-coordinate value on display...}
Any pointer in the right direction is much appreciated.
Thank you!
I figured it out. happened to be too simple :)
var v = plotter.Visible; int X_left = Convert.ToInt32(v.Left); int X_right = Convert.ToInt32(v.Right);
这篇关于在chartplotter中获取水平轴的开始和结束的当前值(动态数据显示)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!