feat(initlize): use a hook into the chart function rather than just waiting