sChartDataPoint's xValue and sChartDataPoint Labels not appearing with weird x locations


#1

In my date shinobi chart with line series, I can’t see to get the labels to show. 

Oddly enough, when I put a breakpoint on the “alterLabel” method, I get weird coordinates for the label.

The sChartPoints for the chart is: 

{ index=0, x=2014-01-04 18:30:00 +0000, y=85.05, selected=N },

{ index=0, x=2014-01-07 18:30:00 +0000, y=85.47, selected=N },

{ index=0, x=2014-01-08 18:30:00 +0000, y=92.56999999999999, selected=N },

{ index=0, x=2014-01-09 18:30:00 +0000, y=97, selected=N }

)

But when I print the sChartPoint in the alterLabel method, the dataPoint prints as: 

Printing description of dataPoint:

{ index=0, x=1389119400, y=85.47, selected=N }

Printing description of dataPoint:

{ index=1, x=1389205800, y=92.56999999999999, selected=N }

Printing description of dataPoint:

{ index=2, x=1389292200, y=97, selected=N }

What is it that I am doing wrong?


#2

Internally, the date is being converted to a Unix Timestamp. 1389119400 is equivalent to 6:30pm January 7th, for example. http://www.unixtimestamp.com/index.php

As for getting the labels to show, can you give us a few more details? The alterLabel:atSliceIndex:inRadialSeries: method is for pie charts, not line series. Instead, you will want alterTickMark: and to examine the “tickMark.tickLabel”


#3

I am using line series and using this method: 

  • (void)sChart:(ShinobiChart *)chart alterDataPointLabel:(SChartDataPointLabel *)label forDataPoint:(SChartDataPoint *)dataPoint inSeries:(SChartSeries *)series

…for changing the labels.

I need to have text inside of the datapoint and hence that method. 

Here’s my m file: 

http://cl.ly/code/0q260I3t1F1Q/ViewController.m


#4

Adding more info:

The tickmark label, apparently is the label that runs through the axis. I need to alter the label insde of a datapoint. Here’s a small mockup. Please ignore the bubbles outside of the line.