dkahgld

AAChartView.h 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. //
  2. // AAChartView.h
  3. // AAChartKit
  4. //
  5. // Created by An An on 17/1/16.
  6. // Copyright © 2017年 An An. All rights reserved.
  7. // source code ----*** https://github.com/AAChartModel/AAChartKit ***--- source code
  8. //
  9. /*
  10. * -------------------------------------------------------------------------------
  11. *
  12. * ❀❀❀ WARM TIPS!!! ❀❀❀
  13. *
  14. * Please contact me on GitHub,if there are any problems encountered in use.
  15. * GitHub Issues : https://github.com/AAChartModel/AAChartKit/issues
  16. * -------------------------------------------------------------------------------
  17. * And if you want to contribute for this project, please contact me as well
  18. * GitHub : https://github.com/AAChartModel
  19. * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
  20. * JianShu : http://www.jianshu.com/u/f1e6753d4254
  21. * SegmentFault : https://segmentfault.com/u/huanghunbieguan
  22. *
  23. * -------------------------------------------------------------------------------
  24. */
  25. #import <UIKit/UIKit.h>
  26. #import "AAChartModel.h"
  27. #import "AAOptions.h"
  28. @protocol AAChartViewDidFinishLoadDelegate<NSObject>
  29. /**
  30. The delegate method of chart view finish loading
  31. */
  32. - (void)AAChartViewDidFinishLoad;
  33. @end
  34. @interface AAChartView:UIView
  35. @property (nonatomic, weak) id<AAChartViewDidFinishLoadDelegate> delegate;
  36. /**
  37. Content width of AAChartView
  38. */
  39. @property (nonatomic, assign) CGFloat contentWidth;
  40. /**
  41. Content height of AAChartView
  42. */
  43. @property (nonatomic, assign) CGFloat contentHeight;
  44. /**
  45. Hide chart series content or not
  46. */
  47. @property (nonatomic, assign) BOOL chartSeriesHidden;
  48. /**
  49. Set the chart view background color be clear
  50. */
  51. @property (nonatomic, assign) BOOL isClearBackgroundColor;
  52. //***********************CONFIGURE THE CHART VIEW CONTENT WITH `AACHARTMODEL`***********************//
  53. /**
  54. Function of drawing chart view
  55. @param chartModel The instance object of chart model
  56. */
  57. - (void)aa_drawChartWithChartModel:(AAChartModel *)chartModel;
  58. /**
  59. Function of only refresh the chart data
  60. @param series Series array of AAChartModel instance object
  61. */
  62. - (void)aa_onlyRefreshTheChartDataWithChartModelSeries:(NSArray<NSDictionary *> *)series;
  63. /**
  64. Function of refreshing whole chart view content
  65. @param chartModel The instance object of chart model
  66. */
  67. - (void)aa_refreshChartWithChartModel:(AAChartModel *)chartModel;
  68. //***********************CONFIGURE THE CHART VIEW CONTENT WITH `AACHARTMODEL`***********************//
  69. //=======================CONFIGURE THE CHART VIEW CONTENT WITH `AAOPTIONS`=======================//
  70. /**
  71. Function of drawing chart view
  72. @param options The instance object of chart options
  73. */
  74. - (void)aa_drawChartWithOptions:(AAOptions *)options;
  75. /**
  76. Function of only refresh the chart data
  77. @param series Series array of AAOptions instance object
  78. */
  79. - (void)aa_onlyRefreshTheChartDataWithOptionsSeries:(NSArray<NSDictionary *> *)series;
  80. /**
  81. Function of refreshing whole chart view content
  82. @param options The instance object of chart options
  83. */
  84. - (void)aa_refreshChartWithOptions:(AAOptions *)options;
  85. //=======================CONFIGURE THE CHART VIEW CONTENT WITH `AAOPTIONS`=======================//
  86. /**
  87. Show the series element content with index
  88. @param elementIndex element index
  89. */
  90. - (void)aa_showTheSeriesElementContentWithSeriesElementIndex:(NSInteger)elementIndex;
  91. @end