# Best way to redraw a graph

**URL:** <https://forum.juce.com/t/best-way-to-redraw-a-graph/39284>\
**Category:** General JUCE discussion\
**Created:** [May 8, 2020, 1:31pm UTC](https://forum.juce.com/t/best-way-to-redraw-a-graph/39284 "2020-05-08T13:31:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmccarver](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jmccarver](https://forum.juce.com/u/jmccarver)\
**Post date:** [May 8, 2020, 1:31pm UTC](https://forum.juce.com/t/best-way-to-redraw-a-graph/39284/1 "2020-05-08T13:31:08Z")

</div>

I’m new to Juce and am working on creating a piece of graphing software where you can change values on a slider and it updates the graph. I have the graph and sliders built, but am having a hard time updating the graph. I draw the graph in the paint function using some code another person, wrote called araz graph ([https://github.com/arabed/ArazGraph](https://github.com/arabed/ArazGraph)). I am trying to paint over it with the new values using the repaint function, but since it’s not a native component I don’t know if repaint will work? How would you generally repaint over something thats not a native JUCE component? Thanks!

Edit: I was overwriting my change in data in the paint function, but it was updating. Thats my bad. Thanks to anyone who read this!
