I use JFreeChart to draw a chart,my code is follows:
 
double[][] data=new double[][] {{500}, {200}, {100}, {400}, {300}};
String[] rowKeys={"apple", "pear", "graph", "orange", "banana"};
String[] columnKeys={""};
dataset=DatasetUtilities.createCategoryDataset(rowKeys,columnKeys,data);
chart=ChartFactory.createBarChart3D("Fruit sale graphic",
                "fruit",
                "sale",
                dataset,
                PlotOrientation.VERTICAL
                true,
                false,
                false);
chart.getLegend().setPosition(RectangleEdge.RIGHT);
 
When I run above code,it show legend at the right of chart. There is "apple", "pear", "graph", "orange", "banana" in the legend.
 - - - - - - - - -
|        apple |
|         pear  |
|        graph |
|       orange|
|      banana|
 - - - - - - - - -
 
My question is how to add total fruit number in the legend? Such as like follows:
 - - - - - - - - - - - - -
| Total 1300 fruit  |
|                  apple |
|                   pear  |
|                  graph |
|                 orange|
|                banana|
 - - - - - - - - - - - - -
How to correct above code?
Thanks
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------