I wanted to ask some chart styling and data questions. My chart currently looks like this:
I would like to add a border around the chart with rounded edges, I have tried using the following code to no avail:
_chart.layer.cornerRadius = 10.0;
_chart.layer.borderWidth = 0.7;
_chart.layer.borderColor = [UIColorwhiteColor].CGColor;
I would also like to add labels to the bars to indicate their values, but have no idea how to do so.
My final question is regarding the data in the chart. Despite having a data structure in the correct order, the data appears scrambled in terms of order (it should read M T W TH F S SU). My data structure is:
_sales[0] = @{@"M" : @1.6, @"T" : @5.6, @"W" : @10.6, @"TH" : @12.6, @"F" : @15.6, @"S" : @3.6, @"Su" : @4.6};
and is used in the following way:
- (id<SChartData>)sChart:(ShinobiChart *)chart dataPointAtIndex:(NSInteger)dataIndex forSeriesAtIndex:(NSInteger)seriesIndex {
SChartDataPoint *datapoint = [[SChartDataPointalloc] init];
NSString* key = _sales[seriesIndex].allKeys[dataIndex];
datapoint.xValue = key;
datapoint.yValue = _sales[seriesIndex][key];
return datapoint;
}
Any advice or input would be appreciate, thanks in advance!