Skip some Xvalue
I was wondering if we can give 2arrays for Xaxis. One which will be the labels underneath the X-Axis and the second is the real Xdata (some of the 1st array) which will have corresponding Yvalues.
I'm trying to figure out in the PNLineChart but getData block in below snippet confuses me how to do this:
-(PNLineChartData_)chartDataForYData:(NSArray_)yArray{
//converting yArray to PNLineChartData
PNLineChartData *chartData = [PNLineChartData new];
chartData.color = [[VCECommon2 sharedObject] getRandomColor];
chartData.itemCount = self.xLabels.count;
chartData.getData = ^(NSUInteger index) {
CGFloat yValue = [yArray[index] floatValue];
return [PNLineChartDataItem dataItemWithY:yValue];
};
return chartData;
}
I'm interested with this issue too! I have a lot amount of data. I want to display all the points on the line chart but only few X labels with a regular interval. Maybe looking to the Y axis display method will help.
Sovled?
@romain64 @aminasadi0