Basically i want the line graph to be zoomed in and Zoomed out(total 4 buttons,2 for X-axis(Zoom in and Zoom out) and other two for Y-axis) on a button click along any axis like if the graph drawn on negative x-axis and negative Y-axis area ,depending on data points then on button click the graph should be Zoomed in and Zoomed out along that negative x-axis or negative Y-axis based on button click.
How can i achieve this ?Any sample code with detail Explanation is much helpful!!
private JButton createZoom()
{
final JButton auto = new JButton("ZOOMIN");
auto.setActionCommand("ZOOM_IN_DOMAIN");
auto.addActionListener(new ChartPanel(chart));
return auto;
}