I have a combinedXYPlot and a drop-down list. I want to update my chart based on user input from drop-down. How to do this?
I tried the following code
frmJPanel.getContentPane().removeAll();
frmJPanel.setLayout(new BorderLayout());
initChart(option);
frmJPanel.repaint();
The changes are reflected only after I minimize/ maximize the window. What is the function that needs to be called? What is the better way to do this ?
ChartPanel“registers with the chart to receive notification of changes to any component of the chart. The chart is redrawn automatically whenever this notification is received.” There are examples here and here.