I'm trying to create a spark line chart, and for the chart, I want only the last data point to be a red circle. To do this, I need to use the paletteItemForPoint delegate method. I am able to get the chart drawn with the correct range background, however, the paletteItemForPoint is not called, but paletteItemForSeries is called. Is there a reason why paletteItemForPoint would not be called.
- (id)initWithFrame:(CGRect) frame
{
self = [super initWithFrame:frame];
if(self) {
self.sparkLineChart = [[TKChart alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
[self.sparkLineChart setBackgroundColor:[UIColor clearColor]];
[self.sparkLineChart setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
self.sparkLineChart.legend.hidden = YES;
self.sparkLineChart.delegate = self;
self.sparkLineChart.dataSource = self;
self.sparkLineChart.title.hidden = YES;
self.sparkLineChart.backgroundColor = [UIColor clearColor];
self.sparkLineChart.plotViewInsets = UIEdgeInsetsMake(0, 0, 0, 0);
self.sparkLineChart.insets = UIEdgeInsetsMake(0, 0, 0, 0);
self.sparkLineChart.gridStyle.horizontalLinesHidden = YES;
self.sparkLineChart.gridStyle.horizontalAlternateFill = nil;
self.sparkLineChart.gridStyle.horizontalFill = nil;
self.sparkLineChart.gridStyle.verticalLinesHidden = YES;
self.sparkLineChart.gridStyle.verticalAlternateFill = nil;
self.sparkLineChart.gridStyle.verticalFill = nil;
[self addSubview:self.sparkLineChart];
}
return self;
}