First part of implementation of the chart