I have in APEX a 'Static content' region. This has the template 'Tabs container'. As subregions (or 'tabs' as it is called within this template) I have multiple charts. The problem is that just the chart of the active tab is displayed correctly. When selecting another tab, the chart within the selected tab is not display. I have to resize the browser window, then the chart is displayed.
I'm using the default APEX Theme (42) without changes.
Is this an APEX bug or am I doing something wrong? If this is bug, is there a workaround?
Link to question in Oracle Community Forum: https://community.oracle.com/thread/3947770?sr=inbox&ru=289068
Thanks for your answers, Peter
I solved this error by the following two steps:
Replace the Tab Container region with a Region Display Selector region. This region is like a tab menu. All regions that should be shown in the tab menu need to have the flag 'Region Display Selector'. All the regions that are handled by the Region Display Selector should be on the same hierarchical level as the Region Display Selector.
The main error still exists but for Region Display Selectors, APEX fires an event for which you can write a handler:
$(document).ready(function() {
$('.apex-rds').data('onRegionChange', function(mode, activeTab) {
$(window).trigger("apexwindowresized");
});
});
The handler fires an event that the browser window size has been changed on which the charts automatically act and redraw everything.
This should also work for the Crousel Container. A big thanks goes to this blog entry: https://apexplained.wordpress.com/2016/05/02/working-with-region-display-selectors-in-apex-5-0/