One last topic before the night is over. I'm seeing drawing irregularities of the range selector when rotated.
Before:
After:
I'm seeing this on two different projects and NucliOS.app "Range Selector" demo. The NucliOS version draws OK on rotation, but the scroll behavior doesn't work until a thumb is moved.
Hey Caylan,
I am only able to reproduce your issue when you don't have a Chart hooked up to the IGRangeSelectorView. Is that when you are seeing the behavior? Or are you seeing when you are hooked up to a chart as well?
Yes, I'm seeing it when contentView is set. My work-around is to nudge the chart's scrollOffset by a point.
-(void)viewDidLayoutSubviews
{
self.rangeSelectorView.contentView = self.chartView;
}
You bet. Download here. You'll find that this uses auto layout. The SE/ConstraintPack is something I forked from Erica Sadun.
Also, a few other odds/ends.
1) Thanks for the translucent thumb. That improvement didn't escape me. :)
2) Note how the thumb here is flush. Yet, the graph's right edge doesn't line up with the left of the thumb. This is a problem, because this 30 point different gets replicated on the main plot and the data doesn't line up exactly.
In other words, if you drag this thumb so it lines up perfectly with the start of the content chart, then you'll see that the larger chart has already zoomed in.
I understand that you may think I'm splitting hairs, but I'm writing on behalf of my client. So let me know what you or I can do to fix it. Cheers!
2) _innerChart.horizontalAutoMargin = 0;
The InnerChart is going to fit to size inside of the zooming area, but that could also be an UIImageView or anything else. The chart has a left / right buffer set up, so you need to cut those out (or more correctly say that we don't need that extra area in this case)
The horizontalAutoMargin was the answer to one of the questions, but there is still an existing issue.
Notice how the portrait version of the image had centered thumbs. On rotation to landscape the thumbs move to the right. I expect that, if the thumbs are centered in portrait, they should be centered in landscape, too. The problem is easily reproducible. There must be a geometry or bounds miscalculation somewhere on rotation.
Also, I noticed that the width of the Y-axis is not accounted for. Is there any way to either: 1) pull the left margin under the left thumb or, 2) don't start zooming until the left thumb's edge enters the chart?