Code for EMC charting library