Adapt data to chart