First implementation of the chart API