dkahgld

AAChartModel.h 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. //
  2. // AAChartModel.h
  3. // AAChartKit
  4. //
  5. // Created by An An on 17/1/20.
  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 <Foundation/Foundation.h>
  26. #import "AASeriesElement.h"
  27. #import "AAPlotLinesElement.h"
  28. typedef NS_ENUM(NSInteger,AAChartAnimation) {
  29. AAChartAnimationLinear = 0,
  30. AAChartAnimationEaseInQuad,
  31. AAChartAnimationEaseOutQuad,
  32. AAChartAnimationEaseInOutQuad,
  33. AAChartAnimationEaseInCubic,
  34. AAChartAnimationEaseOutCubic,
  35. AAChartAnimationEaseInOutCubic,
  36. AAChartAnimationEaseInQuart,
  37. AAChartAnimationEaseOutQuart,
  38. AAChartAnimationEaseInOutQuart,
  39. AAChartAnimationEaseInQuint,
  40. AAChartAnimationEaseOutQuint,
  41. AAChartAnimationEaseInOutQuint,
  42. AAChartAnimationEaseInSine,
  43. AAChartAnimationEaseOutSine,
  44. AAChartAnimationEaseInOutSine,
  45. AAChartAnimationEaseInExpo,
  46. AAChartAnimationEaseOutExpo,
  47. AAChartAnimationEaseInOutExpo,
  48. AAChartAnimationEaseInCirc,
  49. AAChartAnimationEaseOutCirc,
  50. AAChartAnimationEaseInOutCirc,
  51. AAChartAnimationEaseOutBounce,
  52. AAChartAnimationEaseInBack,
  53. AAChartAnimationEaseOutBack,
  54. AAChartAnimationEaseInOutBack,
  55. AAChartAnimationElastic,
  56. AAChartAnimationSwingFromTo,
  57. AAChartAnimationSwingFrom,
  58. AAChartAnimationSwingTo,
  59. AAChartAnimationBounce,
  60. AAChartAnimationBouncePast,
  61. AAChartAnimationEaseFromTo,
  62. AAChartAnimationEaseFrom,
  63. AAChartAnimationEaseTo,
  64. };
  65. typedef NSString *AAChartType;
  66. typedef NSString *AAChartSubtitleAlignType;
  67. typedef NSString *AAChartZoomType;
  68. typedef NSString *AAChartStackingType;
  69. typedef NSString *AAChartSymbolType;
  70. typedef NSString *AAChartSymbolStyleType;
  71. static AAChartType const AAChartTypeColumn = @"column";
  72. static AAChartType const AAChartTypeBar = @"bar";
  73. static AAChartType const AAChartTypeArea = @"area";
  74. static AAChartType const AAChartTypeAreaspline = @"areaspline";
  75. static AAChartType const AAChartTypeLine = @"line";
  76. static AAChartType const AAChartTypeSpline = @"spline";
  77. static AAChartType const AAChartTypeScatter = @"scatter";
  78. static AAChartType const AAChartTypePie = @"pie";
  79. static AAChartType const AAChartTypeBubble = @"bubble";
  80. static AAChartType const AAChartTypePyramid = @"pyramid";
  81. static AAChartType const AAChartTypeFunnel = @"funnel";
  82. static AAChartType const AAChartTypeColumnrange = @"columnrange";
  83. static AAChartType const AAChartTypeArearange = @"arearange";
  84. static AAChartSubtitleAlignType const AAChartSubtitleAlignTypeLeft = @"left";
  85. static AAChartSubtitleAlignType const AAChartSubtitleAlignTypeCenter = @"center";
  86. static AAChartSubtitleAlignType const AAChartSubtitleAlignTypeRight = @"right";
  87. static AAChartZoomType const AAChartZoomTypeNone = @"none";
  88. static AAChartZoomType const AAChartZoomTypeX = @"x";
  89. static AAChartZoomType const AAChartZoomTypeY = @"y";
  90. static AAChartZoomType const AAChartZoomTypeXY = @"xy";
  91. static AAChartStackingType const AAChartStackingTypeFalse = @"";
  92. static AAChartStackingType const AAChartStackingTypeNormal = @"normal";
  93. static AAChartStackingType const AAChartStackingTypePercent = @"percent";
  94. static AAChartSymbolType const AAChartSymbolTypeCircle = @"circle";
  95. static AAChartSymbolType const AAChartSymbolTypeSquare = @"square";
  96. static AAChartSymbolType const AAChartSymbolTypeDiamond = @"diamond";
  97. static AAChartSymbolType const AAChartSymbolTypeTriangle = @"triangle";
  98. static AAChartSymbolType const AAChartSymbolTypeTriangle_down = @"triangle-down";
  99. static AAChartSymbolStyleType const AAChartSymbolStyleTypeDefault = @"default";
  100. static AAChartSymbolStyleType const AAChartSymbolStyleTypeInnerBlank = @"innerBlank";
  101. static AAChartSymbolStyleType const AAChartSymbolStyleTypeBorderBlank = @"borderBlank";
  102. @interface AAChartModel : NSObject
  103. AAPropStatementAndFuncStatement(copy, AAChartModel, NSString *, title);//标题内容
  104. AAPropStatementAndFuncStatement(copy, AAChartModel, NSString *, subtitle);//副标题内容
  105. AAPropStatementAndFuncStatement(copy, AAChartModel, AAChartSubtitleAlignType, subtitleAlign);//图表副标题文本水平对齐方式。可选的值有 “left”,”center“和“right”。 默认是:center.
  106. AAPropStatementAndFuncStatement(copy, AAChartModel, AAChartType, chartType);//图表类型
  107. AAPropStatementAndFuncStatement(copy, AAChartModel, AAChartStackingType, stacking);//堆积样式
  108. AAPropStatementAndFuncStatement(copy, AAChartModel, AAChartSymbolType, symbol);//折线曲线连接点的类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
  109. AAPropStatementAndFuncStatement(assign, AAChartModel, AAChartSymbolStyleType, symbolStyle);
  110. AAPropStatementAndFuncStatement(copy, AAChartModel, AAChartZoomType, zoomType);//缩放类型 AAChartZoomTypeX 表示可沿着 x 轴进行手势缩放
  111. AAPropStatementAndFuncStatement(assign, AAChartModel, AAChartAnimation, animationType);//设置图表的渲染动画类型
  112. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, animationDuration);//设置图表的渲染动画时长
  113. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, inverted);//x 轴是否垂直
  114. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, xAxisReversed);// x 轴翻转
  115. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, yAxisReversed);//y 轴翻转
  116. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, crosshairs);//是否显示准星线(默认显示)
  117. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, gradientColorEnable);//是否要为渐变色
  118. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, polar);//是否极化图形(变为雷达图)
  119. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, dataLabelEnabled);//是否显示数据
  120. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, xAxisLabelsEnabled);//x 轴是否显示数据
  121. AAPropStatementAndFuncStatement(strong, AAChartModel, NSArray *, categories);//图表横坐标每个点对应的名称
  122. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, xAxisGridLineWidth);//x 轴网格线的宽度
  123. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, yAxisLabelsEnabled);//y 轴是否显示数据
  124. AAPropStatementAndFuncStatement(copy, AAChartModel, NSString *, yAxisTitle);//y 轴标题
  125. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, yAxisGridLineWidth);//y轴网格线的宽度
  126. AAPropStatementAndFuncStatement(strong, AAChartModel, NSArray <NSString *>*, colorsTheme);//图表主题颜色数组
  127. AAPropStatementAndFuncStatement(strong, AAChartModel, NSArray *, series);
  128. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, connectNulls);//设置折线是否断点重连(是否连接空值点)
  129. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, legendEnabled);//是否显示图例 lengend(图表底部可点按的圆点和文字)
  130. AAPropStatementAndFuncStatement(copy, AAChartModel, NSString *, backgroundColor);//图表背景色(必须为十六进制的颜色色值如红色"#FF0000")
  131. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, options3dEnable);//是否 3D 化图形(仅对条形图,柱状图有效)
  132. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, options3dAlpha);
  133. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, options3dBeta);
  134. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, options3dDepth);//3D 图形深度
  135. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, borderRadius);//柱状图长条图头部圆角半径(可用于设置头部的形状,仅对条形图,柱状图有效)
  136. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, markerRadius);//折线连接点的半径长度
  137. AAPropStatementAndFuncStatement(assign, AAChartModel, BOOL, yAllowDecimals);//是否允许 y 轴显示小数
  138. AAPropStatementAndFuncStatement(strong, AAChartModel, NSArray *, yPlotLines);//y 轴基线的配置
  139. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, yMax);//y 轴最大值
  140. AAPropStatementAndFuncStatement(strong, AAChartModel, NSNumber *, yMin);//y 轴最小值(设置为0就不会有负数)
  141. AAPropStatementAndFuncStatement(strong, AAChartModel, NSArray *, yTickPositions);//自定义 y 轴坐标(如:[@(0), @(25), @(50), @(75) , (100)])
  142. @end