fix chart creation