initial implementation of chart generation.