我试图将散点图重新用作时间线.....
当我放大或缩小或滚动时,形状消失。
我已经分叉了图表仓库并更改了散点图数据以重现此问题:https://github.com/JayGoTenna/Charts
OR
您只需在ScatterChartViewController.m中将setDataCount更改如下:
- (void)setDataCount:(int)count range:(double)range
{
NSMutableArray *yVals1 = [[NSMutableArray alloc] init];
for (int i = 0; i < count; i++)
{
double val = (double) (arc4random_uniform(range)) + 3;
[yVals1 addObject:[[ChartDataEntry alloc] initWithX:val y:1]];
}
ScatterChartDataSet *set1 = [[ScatterChartDataSet alloc] initWithValues:yVals1 label:@"DS 1"];
[set1 setScatterShape:ScatterShapeSquare];
[set1 setColor:ChartColorTemplates.colorful[0]];
set1.scatterShapeSize = 8.0;
NSMutableArray *dataSets = [[NSMutableArray alloc] init];
[dataSets addObject:set1];
ScatterChartData *data = [[ScatterChartData alloc] initWithDataSets:dataSets];
[data setValueFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:7.f]];
_chartView.data = data;
}
现在,当您放大或滚动图表时,您会发现形状消失了.....
还有其他人看到过吗?