DVYBarView.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // DVYBarView.h
  3. // xxxxx
  4. //
  5. // Created by Fire on 15/11/11.
  6. // Copyright © 2015年 DuoLaiDian. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface DVYBarView : UIView
  10. /**
  11. * y轴的最大值
  12. */
  13. @property (assign, nonatomic) CGFloat yAxisMaxValue;
  14. /**
  15. * y轴分为几段
  16. */
  17. @property (assign, nonatomic) int numberOfYAxisElements;
  18. /**
  19. * x轴文字与坐标轴间隙
  20. */
  21. @property (assign, nonatomic) CGFloat xAxisTextGap;
  22. /**
  23. * y轴文字与坐标轴间隙
  24. */
  25. @property (assign, nonatomic) CGFloat yAxisTextGap;
  26. /**
  27. * 文字大小
  28. */
  29. @property (strong, nonatomic) UIFont *textFont;
  30. /**
  31. * 文字颜色
  32. */
  33. @property (strong, nonatomic) UIColor *textColor;
  34. /**
  35. * 坐标轴颜色
  36. */
  37. @property (strong, nonatomic) UIColor *axisColor;
  38. /**
  39. * 是否添加百分号
  40. */
  41. @property (assign, nonatomic, getter=isPercent) BOOL percent;
  42. /**
  43. * 视图的背景颜色
  44. */
  45. @property (strong, nonatomic) UIColor *backColor;
  46. /**
  47. * 柱的宽度
  48. */
  49. @property (assign, nonatomic) CGFloat barWidth;
  50. /**
  51. * 是否横屏
  52. */
  53. @property (assign,nonatomic,getter=isLandspace) BOOL landspace;
  54. /**
  55. * 图例名称 1
  56. */
  57. @property (strong,nonatomic) NSString *legendTitle1;
  58. /**
  59. * 图例名称 2
  60. */
  61. @property (strong,nonatomic) NSString *legendTitle2;
  62. /**
  63. * 图例颜色1
  64. */
  65. @property (strong,nonatomic) UIColor *legendColor1;
  66. /**
  67. * 图例颜色 2
  68. */
  69. @property (strong,nonatomic) UIColor *legendColor2;
  70. - (void)draw;
  71. @end