DataPoint labels not showing in chart


#1

I want the chart to display the DataPoint labels  but the X Origin of the label is just weird.

Heres the Chart:

self.dailyProductionChart = [[ShinobiChart alloc] initWithFrame:CGRectZero withPrimaryXAxisType:SChartAxisTypeDateTime withPrimaryYAxisType:SChartAxisTypeNumber];
    self.dailyProductionChart.backgroundColor = [UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0];
    self.dailyProductionChart.canvasAreaBackgroundColor = [UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0];
    self.dailyProductionChart.autoCalculateAxisRanges = YES;
    self.dailyProductionChart.title = [NSString stringWithFormat:@"Daily Production - %@ %ld", monthName, (long)yearMonthComponents.year];
    self.dailyProductionChart.titleLabel.font = [UIFont boldSystemFontOfSize:18];
    self.dailyProductionChart.titleCentresOn = SChartTitleCentresOnChart;
    self.dailyProductionChart.titleLabel.bounds = CGRectInset(self.dailyProductionChart.titleLabel.frame, 0, 4);
    self.dailyProductionChart.autoresizingMask = UIViewAutoresizingNone;
    self.dailyProductionChart.delegate = self;
    self.dailyProductionChart.canvasInset = UIEdgeInsetsMake(6, 10, 10, 20);
    self.dailyProductionChart.plotAreaBackgroundColor = [UIColor colorWithRed:236.0/255.0 green:236.0/255.0 blue:236.0/255.0 alpha:1.0f];
    self.dailyProductionChart.plotAreaBorderColor = [UIColor colorWithRed:159.0/255.0 green:159.0/255.0 blue:159.0/255.0 alpha:1.0f];
    self.dailyProductionChart.plotAreaBorderThickness = 2.0;
    self.dailyProductionChart.borderColor = [UIColor lightGrayColor];
    self.dailyProductionChart.borderThickness = @1.0;

Heres the code for the Line Series:

SChartLineSeries *accumulatedLineSeries = [[SChartLineSeries alloc] init];
            
            // Display Crosshair
            accumulatedLineSeries.crosshairEnabled = YES;
            
            // Display Labels
            accumulatedLineSeries.style.dataPointLabelStyle.showLabels = YES;
            
            // Position Labels
            accumulatedLineSeries.style.dataPointLabelStyle.offsetFromDataPoint = CGPointMake(0, -15);
            accumulatedLineSeries.style.dataPointLabelStyle.offsetFlippedForNegativeValues = YES;
            
            // Style Labels
            accumulatedLineSeries.style.dataPointLabelStyle.displayValues = SChartDataPointLabelDisplayValuesY;
            
            accumulatedLineSeries.title = [NSString stringWithFormat:@"Daily Accumulated"];
           
            return accumulatedLineSeries;

sChart:alterDataPointLabel:forDataPoint:inSeries: is called and heres the X Origin of the labels:

DataPointValue 0       XValue: 1406851200      YValue: 0.000000

DataPointLabel 0       {{ -215549.42 , 223}, {8, 16}}

DataPointValue 1       XValue: 1406937600      YValue: 781.085999

DataPointLabel 1       {{ -215543.19 , 214.86537}, {22, 16}}

DataPointValue 2       XValue: 1407024000      YValue: 2919.592529

DataPointLabel 2       {{ -215535.45 , 192.59386}, {33, 16}}

I have 2 other charts and the labels show just fine.

Any ideas why is this happening?

UPDATE:

I think the problem of the wrong X Origin of the labels is related to the type of X Axis. The current type of XAxis is DateTime, but when I change it to Number the labels appear.

Is it a bug or am I missing something?