fix bug of display linechart dynamically