process charts in js rather than ruby