working graph example with data passed from controller