Chart function now accepts param object