IValueScaler.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using System.Collections.Generic;
  2. using System.Windows;
  3. using MuchInfo.Chart.Data.EnumTypes;
  4. namespace MuchInfo.Chart.WPF.Primitives.Interfaces
  5. {
  6. #region Delegates
  7. public delegate void ScalePropertiesChangedEventHandler();
  8. #endregion Delegates
  9. public interface IValueScaler
  10. {
  11. #region Events
  12. event ScalePropertiesChangedEventHandler ScalePropertiesChanged;
  13. #endregion Events
  14. #region Properties
  15. bool Inverse
  16. {
  17. get;
  18. set;
  19. }
  20. #endregion Properties
  21. #region Methods
  22. void CalculateScale(List<PlotBase> plots, IDateScaler scaler, bool isTimeSpaning);
  23. float PercentFromValue(float aVal);
  24. float PercentFromValueDisplay(float aVal);
  25. float ScaledY(float aVal, Rect aRect);
  26. float Spread();
  27. float ValueFromPercent(float aPercent);
  28. float ValueFromPercentDisplay(float aPercent);
  29. float ValueFromY(float aY, Rect aRect);
  30. float YFromPercent(float aPercent, Rect aRect);
  31. float GetMaxValue();
  32. float GetMinValue();
  33. bool ShowScaleAsPercent { get; set; }
  34. float GetPercentBaseline();
  35. /// <summary>
  36. /// 设置是否显示分时图
  37. /// </summary>
  38. bool IsTimeSpaning
  39. {
  40. get;
  41. set;
  42. }
  43. /// <summary>
  44. /// 显示分时图中昨收价
  45. /// </summary>
  46. float TimeSpaningLast { get; set; }
  47. #endregion Methods
  48. }
  49. }