title: What is the best way to manually program line graphs in Java
body: <p>I'm working on a stock market application in Java, <em>using javaFX</em>, and one of my biggest roadblocks so far is the implementation of handmade line graphs. Now I <em>am</em> aware that JavaFX comes with its own classes for dealing with graphs, but I've unfortunately never had luck using them due to how bulky and unnecessary the line graph windows are. I've seen several phenomenal line graphs within related stock market applications, but I don't have the knowledge on how to program them nicely and efficiently. My goal is the following: I would like to make a simple line graph that flows in curves, and <em>not</em> jagged. An example of this would be this image:</p>
  
  <p><a href="https://i.stack.imgur.com/CINyj.png" rel="nofollow noreferrer">Curved Graph Example</a></p>
  
  <p>This graph curves nicely and doesn't feel choppy at all. I am hoping that there is some geometric equation that easily does this. </p>
  
  <p>In JavaFX the method I use to create lines is to plot one endpoint at a certain point and have the second endpoint at another coordinate point in my window and so on and so forth, this however requires several lines to be created, and the endpoints of the lines don't fit real nicely together like I want it. I'm wanting a single line that has the ability to be bent and changed however I see fit.</p>