Thanks very much for posting this. Yes, it does seem that when compiling with API 21 Android is more strict about nested fragments.
For the benefit of anyone reading this it's important to realise that our ChartFragment retains its instance across configuration changes. Ultimately this means you don't have to worry about saving the chart's state across such changes but limits you to not being able to put ChartFragments inside other Fragments.
If this is required you will want to create your own 'ChartFragment' - a Fragment that contains a ChartView. You have to make sure you forward any lifecycle calls from the Fragment to the ChartView, namely onPause and onResume, otherwise you'll get a crash when you navigate away and back to your app. As you cannot call setRetainInstance(true) you will also be responsible for persisting any state across configuration changes (but depending on your use case this may not be that big a thing).
Android only allows nested fragments when they are created in code, not XML, and as far as I understand it both the outer and inner fragments have to be created in code.