text « Legend « JFreeChart Q&A

Home
JFreeChart Q&A
1.Axis
2.BarChart
3.Chart
4.Color
5.Component
6.Dataset
7.Development
8.GanttChart
9.Graph
10.Image
11.Interoperability
12.Label
13.Layout
14.Legend
15.LineChart
16.PieChart
17.Plot
18.Renderer
19.Series
20.ToolTip
21.XYLineChart
JFreeChart Q&A » Legend » text 

1. How do update the text of a legend item?    jfree.org

I am using time series. I am trying to : 1. static class CustomizedStandardXYSeriesLabelGenerator extends StandardXYSeriesLabelGenerator { private static final long serialVersionUID = 1L; TimeSeriesCollection xydataset; CustomizedStandardXYSeriesLabelGenerator(TimeSeriesCollection xydataset) { this.xydataset = xydataset; } public String generateItemLabel(int series){ return this.xydataset.getSeries(series).getDescription(); } } 2. //set the customized legend label generator renderer.setLegendItemLabelGenerator(new CustomizedStandardXYSeriesLabelGenerator(xydataset)); where "xydataset" is an object of "TimeSeriesCollection" 3. xydataset.getSeries(2*attackTypes.length).setDescription("Before Filtering"); then ...

2. Legend's Text display a strip    jfree.org

I am still not sure what you problem is! Do I get you right that the image created from the chart looks ok, but if you embed the image in a pdf, the image is wrong? Then something is wrong with the way you embed the image. Do you have some sample code?

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.