SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

A useful addition to the OhlcDataSeries would be an Append(datetime,value) method that would automatically determine whether to update the latest open, high, low, close or add a new bar based based on the values passed in, the current bar time/values and the BarTimeFrame property.

Thanks again

Paul

  • You must to post comments
0
0

Hi Paul,

Thanks for the suggestion, we appreciate feedback from our customers which help to make our API/user experience better! We will consider if this can be done to improve usability of stock charts in future iterations.

For now, you can implement such a method using Update/Insert/Append existing API in this way:

        private void AddOrUpdatePoint(DateTime date, double value)
        {
            if (_dataSeries.XValues.IndexOf(date) >= 0)
            {
                _dataSeries.Update(date, value);
            }
            else
            {
                _dataSeries.Append(date, value);
            }
        }

Thanks,
Yuriy

  • David Whatley
    That is incorrect. This is in reference to the ohlcDataSeries. It is not a single value, though a new single value would be what is passed in. Then it would have to figure out the correct action: Add a new bar, setting ohlc values to that value. Or update the existing bar, changing the h and l values if appropriate and setting the c value to that.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.