IDateScaler.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using MuchInfo.Chart.Data.Interfaces;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace MuchInfo.Chart.WPF.Primitives.Interfaces
  5. {
  6. public interface IDateScaler
  7. {
  8. #region Properties
  9. /// <summary>
  10. /// 请求图表长度
  11. /// </summary>
  12. string DesiredChartLength
  13. {
  14. get;
  15. set;
  16. }
  17. DateTime DesiredEndDate
  18. {
  19. get;
  20. set;
  21. }
  22. int EndDateIndex
  23. {
  24. get;
  25. set;
  26. }
  27. int NumBars
  28. {
  29. get;
  30. set;
  31. }
  32. int StartDateIndex
  33. {
  34. get;
  35. set;
  36. }
  37. #endregion Properties
  38. #region Methods
  39. int BinaryIndexSearch(DateTime aDate, int minIndex);
  40. int Count();
  41. DateTime DateFromX(double aX);
  42. DateTime DateValue(int aIndex);
  43. bool DateVisible(DateTime aDate);
  44. bool DateContains(DateTime date);
  45. double DistanceBetweenDates();
  46. int FirstVisibleIndexFromData(IList<ILineDataPoint> data);
  47. int LastVisibleIndexFromData(IList<ILineDataPoint> data);
  48. bool HasNonEODDates();
  49. int IndexFromDate(DateTime aDate);
  50. float PercentFromIndex(int aIndex);
  51. int WidthWithBarBuffer();
  52. float XforDate(DateTime aDate);
  53. DateTime OriginalDateFromX(double aX);
  54. DateTime OriginalDateFromX(double aX, int offSet);
  55. DateTime OriginalDateValue(int index);
  56. #endregion Methods
  57. }
  58. }