fix chart generation