MY PROBLEM IS THAT I SEE ONLY ONE SERIES NAME IN THE LEGEND EVEN IF THIS WORK FINE
seriesNameList.add("Mario");
seriesNameList.add("Anna");
seriesNameList.add("Federica");
thanks to every one could help me !!
legend and diplay series name in the legend
Re: legend and diplay series name in the legend
You'll have to supply a little more information about where seriesNameList comes from.
Regards,
DG.
Regards,
DG.
Re: legend and diplay series name in the legend
/**
* A utility method that returns a list of series names ("Series 1", "Series 2" etc.). The
* number of series matches the size of the data array. String objects are used to
* represent the series names. This method is called by constructors that do not specify
* series names.
*/
public static List seriesNameListFromDataArray(Number[][] data) {
int seriesCount = data.length;
List seriesNameList = new ArrayList( ) ;
seriesNameList.add("Daniele "+"Anna");
seriesNameList.add("Mario "+"Anna");
return seriesNameList ;
}
this is the code in Class DefaultCategoryDataSource
thanks a lot
* A utility method that returns a list of series names ("Series 1", "Series 2" etc.). The
* number of series matches the size of the data array. String objects are used to
* represent the series names. This method is called by constructors that do not specify
* series names.
*/
public static List seriesNameListFromDataArray(Number[][] data) {
int seriesCount = data.length;
List seriesNameList = new ArrayList( ) ;
seriesNameList.add("Daniele "+"Anna");
seriesNameList.add("Mario "+"Anna");
return seriesNameList ;
}
this is the code in Class DefaultCategoryDataSource
thanks a lot
Re: legend and diplay series name in the legend
OK...it looks as though I've dropped that method from the latest version, though I don't remember working on it...that's a worry!
Anyway, I'd recommend that you use this method to set all the series names at once:
public void setSeriesNames(String[] seriesNames)
I should probably add a new method for the next version:
public void setSeriesName(int series, String name)
Hope that helps,
Regards,
Dave Gilbert.
Anyway, I'd recommend that you use this method to set all the series names at once:
public void setSeriesNames(String[] seriesNames)
I should probably add a new method for the next version:
public void setSeriesName(int series, String name)
Hope that helps,
Regards,
Dave Gilbert.
Re: legend and diplay series name in the legend
this work very well :
String [] seriesName1 = {"Alfa","Beta" , "Gamma"} ;
DefaultCategoryDataSource test = new DefaultCategoryDataSource( data ) ;
test.setSeriesNames( seriesName1 ) ;
but I have the visualization problem in the legend at the right of the graph : i see only the first element of the series " Alfa"
String [] seriesName1 = {"Alfa","Beta" , "Gamma"} ;
DefaultCategoryDataSource test = new DefaultCategoryDataSource( data ) ;
test.setSeriesNames( seriesName1 ) ;
but I have the visualization problem in the legend at the right of the graph : i see only the first element of the series " Alfa"
Re: legend and diplay series name in the legend
Can you e-mail me a screen copy showing the problem?
Regards,
DG.
Regards,
DG.