android - Need to set column label dynamically in JFreeChart -
please see attached screeshot. want set label dynamically x axis. says test1,test2,test3,test4..if want set category array dynamically how can that? mean want set category house expense,office rent, food...etc. here screenshot , code.
http://www.screencast.com/t/lak24qqvfm3
here bar chart code. see line between 86-90.
http://pastebin.com/mxq4ztbw
can me that? if not clear please ask.
thanks in advance.
replace createdataset()
this:
private static categorydataset createdataset() { defaultcategorydataset dataset = new defaultcategorydataset(); dataset.addvalue(40.0,"expediture","house"); dataset.addvalue(30.0,"expediture","office rent"); dataset.addvalue(-20.5,"expediture","food"); dataset.addvalue(30.0,"expediture","other"); dataset.addvalue(6.0,"expediture","etc"); return dataset; }
Comments
Post a Comment