Strange gap around chart


#1

I’ve created a range selector chart and I want the chart to fill the entire width of a container view. I’ve added the ShinobiChart as a subview of my container view and set the frame of the chart to match the bounds of the superview. As the range selector has no legend or axis I would expect the chart to use all the width of the superview. But there is an odd couple of pixels space to the left and bottom of the chart view.

I’ve inspected the view using Reveal.app and noticed that while the SChartCavas view is correctly sized the subviews i.e. SChartGLView and SChartCanvasRenderView and sized incorrectly. The canvas size is 984x96 which is correct, but the sub views mentioned above are 982.5x94.5.

Is there some left over padding from where the axis or legend would be that is causing this anomaly?


#2

Just wondering if there is an update on this, could do with a solution as it looks pretty bad at the moment?


#3

Hi camsoft,

What methods were you using to disable everything?

I can make the axis disappear by setting the following variables:

self.chart.xAxis.style.majorTickStyle.showLabels = NO;
self.chart.xAxis.style.majorTickStyle.showTicks = NO;
self.chart.yAxis.style.majorTickStyle.showLabels = NO;
self.chart.yAxis.style.majorTickStyle.showTicks = NO;
self.chart.xAxis.style.minorTickStyle.showTicks = NO;
self.chart.yAxis.style.minorTickStyle.showTicks = NO;

#4

Yeah I’m already doing this, I susspect it’s a bug with Shinobi to due with the weird rounding as when I inspect the frames they have sub-pixel precision.