format data and basic graph