Pre loader

RolloverModifier OHLC Problem

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

How do I get the data O, H, L, C and sent to another user control?I do not see any event to start.

  • You must to post comments
0
0

Hi there,
Please,take a look at our SciChart Trader example. Notice, how labels data is bound to RolloverModifier.RolloverData.SeriesInfo object; to create it, RolloverModifier calls IRenderableSeries.HitTest(Point atPoint, bool interpolate), and this returns HitTestInfo object as a result:

 /// <summary>
    /// Provides information on a series hit test operation, see <see cref="BaseRenderableSeries.HitTest"/> for more information
    /// </summary>
    public struct HitTestInfo
    {
        /// <summary>
        /// Provides information about the type of <see cref="IDataSeries"/> that was hit tested
        /// </summary>
        public DataSeriesType DataSeriesType { get; set; }

        /// <summary>
        /// Gets or sets a point snapped to the X-Y value of the series
        /// </summary>
        public Point HitTestPoint { get; set; }

        /// <summary>
        /// Gets or sets a point snapped to the X-Y1 series
        /// </summary>
        public Point Y1HitTestPoint { get; set; }

        /// <summary>
        /// Gets or sets the X Value at the hit-test site
        /// </summary>
        public IComparable XValue { get; set; }

        /// <summary>
        /// Gets or sets the Y-Value at the hit-test site
        /// </summary>
        public IComparable YValue { get; set; }

        /// <summary>
        /// Gets or sets the Y1-Value at the hit-test site
        /// </summary>
        public IComparable Y1Value { get; set; }

        /// <summary>
        /// Gets or sets the Open-Value at the hit-test site
        /// </summary>
        public IComparable OpenValue { get; set; }

        /// <summary>
        /// Gets or sets the High-Value at the hit-test site
        /// </summary>
        public IComparable HighValue { get; set; }

        /// <summary>
        /// Gets or sets the Low-Value at the hit-test site
        /// </summary>
        public IComparable LowValue { get; set; }

        /// <summary>
        /// Gets or sets the Close-Value at the hit-test site
        /// </summary>
        public IComparable CloseValue { get; set; }

        /// <summary>
        /// Gets or sets the DataSeriesIndex a the hit-test site
        /// </summary>
        public int DataSeriesIndex { get; set; }

        /// <summary>
        /// Gets or sets whether the HitTest operation was a hit or not
        /// </summary>
        /// <remarks>Defined as the input point being within a small distance of the output hittest point</remarks>
        public bool IsHit { get; set; }

        /// <summary>
        /// Gets or sets whether the input point is between first and last series point or not
        /// </summary>
        public bool IsWithinDataBounds { get; set; }
    }

So, you can use existing Rollover or Cursor modifier and get data from there, or create your own modifier (see How to create custom modifier and Using chart modifiers tutorials for more info) and implement hit-test logic here.

Hope this helps and please, let us know if you need assistance with this!

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies