Chart size


#1

Good day!,

I’m having a devil of a time getting my chart to go full-screen / full frame. 

My app is, at this point basically the quick start app, with the caveat that my chart sits within a tabviewcontroller. I’ve paid particular attention to this bit of code:

``chart = [[ShinobiChart alloc] initWithFrame:self.view.bounds];

However, inspection of the app at runtime shows that ‘self.view.bounds’ returns a cgrect obj with x,y coordinates of 0x0 and size of 0x0. My chart does show up, however it is rather tiny, and centered in the frame. attached is the screen shot. 

where it's at.

http://imgur.com/6Zk37e0 is the link, just in case that image tag isn’t working.

I’m kind of confused as to what I might be doing wrong ? i’ve looked throug the docs to try and find methods for setting the size, but it appears the initial constructor of initWithFrame is *the* way to set the size? Additionally, my while my chart is drawn, i see this in the logs: 

2013-03-02 15:01:29.826 Madrona Dynamics CRM BI Demo[98438:c07] The size/layout of the ShinobiChart does not have sufficient room for laying out its elements, and may display incorrectly. Try disabling the chart legend, axis labels, axis titles, etc. or increasing the size of the chart itself

From: ShinobiChart at 0x9b8a6c0

#<CGRect origin=#<CGPoint x=0.0 y=0.0> size=#<CGSize width=0.0 height=100.0>>

2013-03-02 15:01:29.830 Madrona Dynamics CRM BI Demo[98438:c07] Defaulting axis width, invalid value given

Width Value given:30

Width Value used:0

From: SChartNumberAxis at 0xe998c40, axisRange = (null), defaultRange = (null), maxRange = (null)

2013-03-02 15:01:29.832 Madrona Dynamics CRM BI Demo[98438:c07] Defaulting axis width, invalid value given

Width Value given:30

Width Value used:0

From: SChartNumberAxis at 0x9ce7540, axisRange = (null), defaultRange = (null), maxRange = (null)

Not sure where these numbers are coming from… 


#2

Hi codeFriar,

ShinobiChart inherits from UIView, so you can set the frame property at any time. 

Regards,

Robin Sillem

Lead Developer

ShinobiControls


#3

Except that it’s not honoring the frame property. I’ve manually set dimensions on a cgrect frame and passed that to initWithFrame and I still get a chart the same small size. Is this a limitiation of the trial license ?


#4

Hi codeFriar,

I don’t think this is a charts issue, rahter when you’re setting the frame equal to self.view.bounds before the bounds have not yet been set.  Do you have this in viewDidLoad? Try moving it to viewWillAppear or if you’re using interface builder change the UIView there to a ShinobiChart instead.

Cheers,

Steve.