add valid check logic in chartx.realtime