'Oracle Apex Why when no input selected Line-with-Area chart does not show latest values?

In my Oracle Apex app, I have created a line-with-area chart that refreshes when no input or input is selected. When there is no input selected the chart shows all available inputs however does not load recent values: (Recent values for P2106 (light-grey line) were inserted on the 17th of April however it is not seen here (last input seen on 11th of April): enter image description here

But when I choose exactly the P2106 input graph shows recent values (on 17th of April): enter image description here

Below see my SQL query for the graph:

select null, PARAMETER_, TAG_IDENTIFIER, INPUT, TO_CHAR(TIME_,'dd-mon-yyyy hh:mi pm') AS TIME_
from LOGS_HISTORY
where (:P20_SELECT_TAG is null or TAG_IDENTIFIER = :P20_SELECT_TAG)
and (TIME_ between to_date(:P16_DATE_FROM, 'dd-mon-yyyy hh:mi pm', 'nls_date_language=english')
               and to_date(:P16_DATE_TO  , 'dd-mon-yyyy hh:mi pm', 'nls_date_language=english') )
order by TIME_ 

Here I am simply trying to illustrate values in the selected period range.

Please suggest what is wrong and maybe there are certain improvements that can be considered?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source