Changed chart logic location