fixed bug in showGraph/showTrendGraph functions