Fixed JSON encoding for Deviation chart