I have crateed a graph with a series of values,

but now I need to change my Y-axis, The graphs must show in depth. That is to say, in the Y-axis the Depth goes. The highest value of the Y-axis corresponds with value 0 and the values will grow downwards.
How can I do this??
I post my code for help:
Code: Select all
public JFreeChart XYLine2(String vInDep, String vDep){
XYSeries series = new XYSeries("Leyenda de Línea");
/*[b]arrayVars [/b]is a global variable that contains two columns and several rows. It contains the data to represent in the chart */
for (int i=0; i<arrayVars.length; i++){
if( (null != arrayVars[i][0]) && (null != arrayVars[i][1]) ){
float x= Float.parseFloat(arrayVars[i][0]);
float y= Float.parseFloat(arrayVars[i][1]);
series.add(x,y);
}
}
XYDataset ColeccionDatos = new XYSeriesCollection(series);
JFreeChart graph = ChartFactory.createXYLineChart(
vDep+" vs "+vInDep, //Tittle
vInDep, //X-axis
vDep, //Y-axis
ColeccionDatos, //Dataset
PlotOrientation.HORIZONTAL, //Orientation
false, //Flag legend
true, //Flag tooltip
false //Flag URLs
);
return graph;
}
THANKS VERY MUCH;