0

How to make the title first letter as capital and rest of them are in lower case and make the font as italc

String snameTitle=request.getParameter("name");
snameTitle=name.replace("_"," ");

JFreeChart chart = ChartFactory.createXYLineChart("Reflectance Graph for "+snameTitle,"Wavelength(nm)","Reflectance(%)",xyDataset,PlotOrientation.VERTICAL, false, false,false);

Any one sugesst me to make the titleof jfree chart like this Hyptis suavalovens

1 Answers1

0

you can use javascript function like this:

String.prototype.capitalize = function() {
    return this.replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); });
};

Usage:

var name = 'andi sholihin';

var name_caps = name.capitalize();

alert(name_caps);

Output :

Andi Sholihin

More Info : Capitalize words in string

Community
  • 1
  • 1
Andi Sholihin
  • 479
  • 3
  • 8