Question about partials and logic in rails

lo there,
i have a partial i want to display that will contain a graph, but i
don’t
want to do all the data pulls from the rhtml, so if i do, say, a render
partial _chart.rhtml, will it respond to a controller function called
chart
and be able to use its variables ?
Or is this a place to put a helper ?

thanks
sk