#How to make JavaFX LineChart update when moving a slider?

1 messages · Page 1 of 1 (latest)

empty ruin
#

I tried to create a simple program with 2 sliders that calculates savings and shows its change over 30 years in a line graph. You should be able to change the amount that is put into the account each month and the interest rate using the sliders.

So far I got the line graph and sliders, but I can't make the graph react to the slider changing. Can anyone give some tips where to start?

storm runeBOT
#

<@&987246487241105418> please have a look, thanks.

storm runeBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

empty ruin
#

Here's an image to make what I'm talking about a bit clearer

empty ruin
#

Would it be possible to do it using EventDispatcher?

half spire
#

you just want to add an event which listens to the changes of the slider in order to change the graph

#

and you can easily combine the values using the .bind method of properties

#

@empty ruin