实时数据收集的动态绘图。
要运行示例项目,请克隆仓库,然后在 Example 目录中首先运行 pod install
。
UHNScrollingTimeSeriesPlotView 可以包含在 IB 中或以程序方式创建。它是 UHNGraphView 的子类,而 UHNGraphView 又是 UIView 的子类。在本 Pod 中的主导类是 UHNScrollingTimeSeriesPlotView
,用于绘制实时收集的数据。
#import "UHNScrollingTimeSeriesPlotView.h"
@property(nonatomic,strong) IBOutlet UHNScrollingTimeSeriesPlotView *plotView;
[self.plotView setupPlotWithXAxisMin: 0.
xAxisMax: 30.
xMinorStep: 2
xMajorStep: 10.
xAxisLabel: nil
xAxisFormatString: nil
yAxisMin: 0.
yAxisMax: 200.
yMinorStep: 50.
yMajorStep: 100.
yAxisLabel: nil
yAxisFormatString: nil
gridColor: [UIColor grayColor]
gridFrameWidth: 1.
drawGridFrame: YES
fadeGridLineEdges: YES
lineColor: [UIColor whiteColor]
lineHeadColor: [UIColor blueColor]
andLineWidth: 1.];
self.plotView.plotRefreshRateInHz = 1.;
self.plotView.samplingRateInHz = 1.;
self.plotView.windowMaxSize = 60;
self.plotView.backgroundColor = [UIColor clearColor];
[self.plotView generateRandomData: YES];
要将 UHNTimeSeriesPlotView 安装到另一个项目中,请简单地将以下行添加到您的 Podfile 中
pod "UHNTimeSeriesPlotView"
Pod 的 appledoc
可在 ./doc/html/index.html
找到
Nathaniel Hamming, [email protected]
UHNTimeSeriesPlotView 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。