Rev 1907 | Rev 1909 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1907 | Rev 1908 | ||
---|---|---|---|
1 | package pt.estgp.estgweb.services.courses.coursereport.documentmodel.learningresults.components; |
1 | package pt.estgp.estgweb.services.courses.coursereport.documentmodel.learningresults.components; |
2 | 2 | ||
3 | import jomm.utils.BytesUtils; |
3 | import jomm.utils.BytesUtils; |
4 | import jomm.utils.MimeTypeGuesser; |
4 | import jomm.utils.MimeTypeGuesser; |
5 | import org.jfree.chart.ChartFactory; |
5 | import org.jfree.chart.ChartFactory; |
6 | import org.jfree.chart.JFreeChart; |
6 | import org.jfree.chart.JFreeChart; |
7 | import org.jfree.chart.axis.CategoryAxis; |
7 | import org.jfree.chart.axis.CategoryAxis; |
8 | import org.jfree.chart.axis.NumberAxis; |
8 | import org.jfree.chart.axis.NumberAxis; |
9 | import org.jfree.chart.block.BlockBorder; |
9 | import org.jfree.chart.block.BlockBorder; |
10 | import org.jfree.chart.labels.ItemLabelAnchor; |
10 | import org.jfree.chart.labels.ItemLabelAnchor; |
11 | import org.jfree.chart.labels.ItemLabelPosition; |
11 | import org.jfree.chart.labels.ItemLabelPosition; |
12 | import org.jfree.chart.labels.StandardCategoryItemLabelGenerator; |
12 | import org.jfree.chart.labels.StandardCategoryItemLabelGenerator; |
13 | import org.jfree.chart.plot.CategoryPlot; |
13 | import org.jfree.chart.plot.CategoryPlot; |
14 | import org.jfree.chart.plot.PiePlot; |
14 | import org.jfree.chart.plot.PiePlot; |
15 | import org.jfree.chart.plot.PlotOrientation; |
15 | import org.jfree.chart.plot.PlotOrientation; |
16 | import org.jfree.chart.plot.RingPlot; |
16 | import org.jfree.chart.plot.RingPlot; |
17 | import org.jfree.chart.renderer.category.StackedBarRenderer; |
17 | import org.jfree.chart.renderer.category.StackedBarRenderer; |
18 | import org.jfree.chart.renderer.category.StandardBarPainter; |
18 | import org.jfree.chart.renderer.category.StandardBarPainter; |
19 | import org.jfree.data.category.DefaultCategoryDataset; |
19 | import org.jfree.data.category.DefaultCategoryDataset; |
20 | import org.jfree.data.general.DefaultPieDataset; |
20 | import org.jfree.data.general.DefaultPieDataset; |
21 | import org.jfree.ui.RectangleInsets; |
21 | import org.jfree.ui.RectangleInsets; |
22 | import org.jfree.ui.TextAnchor; |
22 | import org.jfree.ui.TextAnchor; |
23 | import pt.estgp.estgweb.services.courses.coursereport.documentmodel.CourseReportDocument; |
23 | import pt.estgp.estgweb.services.courses.coursereport.documentmodel.CourseReportDocument; |
24 | import pt.estgp.estgweb.utils.Globals; |
24 | import pt.estgp.estgweb.utils.Globals; |
25 | import pt.estgp.estgweb.utils.documentBuilder.ImageComponent; |
25 | import pt.estgp.estgweb.utils.documentBuilder.ImageComponent; |
26 | import pt.estgp.estgweb.web.controllers.utils.FileUploaded; |
26 | import pt.estgp.estgweb.web.controllers.utils.FileUploaded; |
27 | 27 | ||
28 | import javax.imageio.ImageIO; |
28 | import javax.imageio.ImageIO; |
29 | import java.awt.*; |
29 | import java.awt.*; |
30 | import java.awt.image.BufferedImage; |
30 | import java.awt.image.BufferedImage; |
31 | import java.io.FileOutputStream; |
31 | import java.io.FileOutputStream; |
32 | import java.io.IOException; |
32 | import java.io.IOException; |
33 | import java.text.DecimalFormat; |
33 | import java.text.DecimalFormat; |
34 | import java.text.NumberFormat; |
34 | import java.text.NumberFormat; |
35 | import java.util.List; |
35 | import java.util.List; |
36 | 36 | ||
37 | /** |
37 | /** |
38 | * Created by jorgemachado on 31/10/17. |
38 | * Created by jorgemachado on 31/10/17. |
39 | */ |
39 | */ |
40 | public class GlobalLearningResultsChartYearImg extends ImageComponent |
40 | public class GlobalLearningResultsChartYearImg extends ImageComponent |
41 | { |
41 | { |
42 | /** |
42 | /** |
43 | * |
43 | * |
44 | * @param results |
44 | * @param results |
45 | * @return the tmp path for generated chart |
45 | * @return the tmp path for generated chart |
46 | * @throws IOException |
46 | * @throws IOException |
47 | */ |
47 | */ |
48 | public FileUploaded generateChart2tmp(UnitsLearningResultsTable results, CourseReportDocument courseReportDocument) throws 1.5.0/docs/api/java/io/IOException.html">IOException |
48 | public FileUploaded generateChart2tmp(UnitsLearningResultsTable results, CourseReportDocument courseReportDocument) throws 1.5.0/docs/api/java/io/IOException.html">IOException |
49 | { |
49 | { |
50 | List<UnitsLearningResultYear> unitsLearningResultYearList = results.getYears(); |
50 | List<UnitsLearningResultYear> unitsLearningResultYearList = results.getYears(); |
51 | 51 | ||
52 | 52 | ||
53 | 1.5.0/docs/api/java/lang/String.html">String tempName = BytesUtils.generateHexKey() + ".png"; |
53 | 1.5.0/docs/api/java/lang/String.html">String tempName = BytesUtils.generateHexKey() + ".png"; |
54 | 54 | ||
55 | DefaultCategoryDataset data = new DefaultCategoryDataset(); |
55 | DefaultCategoryDataset data = new DefaultCategoryDataset(); |
56 | 56 | ||
57 | for(UnitsLearningResultYear temp: unitsLearningResultYearList) { |
57 | for(UnitsLearningResultYear temp: unitsLearningResultYearList) { |
58 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1013Percent()*100)/100),"Aprovados 10-13",""+temp.ano + "º Ano"); |
58 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1013Percent())),"Aprovados 10-13",""+temp.ano + "º Ano"); |
59 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1416Percent()*100)/100),"Aprovados 14-16",""+temp.ano + "º Ano"); |
59 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1416Percent())),"Aprovados 14-16",""+temp.ano + "º Ano"); |
60 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1720Percent()*100)/100),"Aprovados 17-20",""+temp.ano + "º Ano"); |
60 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1720Percent())),"Aprovados 17-20",""+temp.ano + "º Ano"); |
61 | } |
61 | } |
62 | 62 | ||
63 | for(UnitsLearningResultYear temp: unitsLearningResultYearList) { |
63 | for(UnitsLearningResultYear temp: unitsLearningResultYearList) { |
64 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1013Percent()*100)/100),"Aprovados 10-13","2º Ano"); |
64 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1013Percent())),"Aprovados 10-13","2º Ano"); |
65 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1416Percent()*100)/100),"Aprovados 14-16","2º Ano"); |
65 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1416Percent())),"Aprovados 14-16","2º Ano"); |
66 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1720Percent()*100)/100),"Aprovados 17-20","2º Ano"); |
66 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1720Percent())),"Aprovados 17-20","2º Ano"); |
67 | } |
67 | } |
68 | 68 | ||
69 | for(UnitsLearningResultYear temp: unitsLearningResultYearList) { |
69 | for(UnitsLearningResultYear temp: unitsLearningResultYearList) { |
70 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1013Percent()*100)/100),"Aprovados 10-13","3º Ano"); |
70 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1013Percent())),"Aprovados 10-13","3º Ano"); |
71 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1416Percent()*100)/100),"Aprovados 14-16","3º Ano"); |
71 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((int)(temp.getAprovados1416Percent())),"Aprovados 14-16","3º Ano"); |
72 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double((32*100)/100),"Aprovados 17-20","3º Ano"); |
72 | data.addValue(new 1.5.0/docs/api/java/lang/Double.html">Double(32),"Aprovados 17-20","3º Ano"); |
73 | } |
73 | } |
74 | 74 | ||
75 | 75 | ||
76 | 76 | ||
77 | JFreeChart chart = ChartFactory.createStackedBarChart(null,null,null,data, PlotOrientation.VERTICAL,true,false,false); |
77 | JFreeChart chart = ChartFactory.createStackedBarChart(null,null,null,data, PlotOrientation.VERTICAL,true,false,false); |
78 | 78 | ||
79 | CategoryPlot plot = chart.getCategoryPlot(); |
79 | CategoryPlot plot = chart.getCategoryPlot(); |
80 | RectangleInsets chartRectangle = new RectangleInsets(0,0,30F,0); |
80 | RectangleInsets chartRectangle = new RectangleInsets(0,0,30F,0); |
81 | chart.setPadding(chartRectangle); |
81 | chart.setPadding(chartRectangle); |
82 | plot.setBackgroundPaint(1.5.0/docs/api/java/awt/Color.html">Color.WHITE); |
82 | plot.setBackgroundPaint(1.5.0/docs/api/java/awt/Color.html">Color.WHITE); |
83 | CategoryAxis axis = plot.getDomainAxis(); |
83 | CategoryAxis axis = plot.getDomainAxis(); |
84 | NumberAxis axis2 = (NumberAxis) plot.getRangeAxis(); |
84 | NumberAxis axis2 = (NumberAxis) plot.getRangeAxis(); |
85 | 1.5.0/docs/api/java/text/NumberFormat.html">NumberFormat pctFormat = new 1.5.0/docs/api/java/text/DecimalFormat.html">DecimalFormat("#'%'"); |
85 | 1.5.0/docs/api/java/text/NumberFormat.html">NumberFormat pctFormat = new 1.5.0/docs/api/java/text/DecimalFormat.html">DecimalFormat("#'%'"); |
86 | axis.setTickLabelFont(new 1.5.0/docs/api/java/awt/Font.html">Font("Helvetica", 1.5.0/docs/api/java/awt/Font.html">Font.PLAIN, 30)); |
86 | axis.setTickLabelFont(new 1.5.0/docs/api/java/awt/Font.html">Font("Helvetica", 1.5.0/docs/api/java/awt/Font.html">Font.PLAIN, 30)); |
87 | axis2.setTickLabelFont(new 1.5.0/docs/api/java/awt/Font.html">Font("Helvetica", 1.5.0/docs/api/java/awt/Font.html">Font.PLAIN, 30)); |
87 | axis2.setTickLabelFont(new 1.5.0/docs/api/java/awt/Font.html">Font("Helvetica", 1.5.0/docs/api/java/awt/Font.html">Font.PLAIN, 30)); |
88 | axis2.setNumberFormatOverride(pctFormat); |
88 | axis2.setNumberFormatOverride(pctFormat); |
89 | 89 | ||
90 | 1.5.0/docs/api/java/awt/Color.html">Color brown = new 1.5.0/docs/api/java/awt/Color.html">Color(237,125,49); |
90 | 1.5.0/docs/api/java/awt/Color.html">Color brown = new 1.5.0/docs/api/java/awt/Color.html">Color(237,125,49); |
91 | 1.5.0/docs/api/java/awt/Color.html">Color yellow = new 1.5.0/docs/api/java/awt/Color.html">Color(255,192,0); |
91 | 1.5.0/docs/api/java/awt/Color.html">Color yellow = new 1.5.0/docs/api/java/awt/Color.html">Color(255,192,0); |
92 | 1.5.0/docs/api/java/awt/Color.html">Color green = new 1.5.0/docs/api/java/awt/Color.html">Color(112,173,71); |
92 | 1.5.0/docs/api/java/awt/Color.html">Color green = new 1.5.0/docs/api/java/awt/Color.html">Color(112,173,71); |
93 | 93 | ||
94 | StackedBarRenderer renderer = (StackedBarRenderer) plot.getRenderer(); |
94 | StackedBarRenderer renderer = (StackedBarRenderer) plot.getRenderer(); |
95 | renderer.setGradientPaintTransformer(null); |
95 | renderer.setGradientPaintTransformer(null); |
96 | plot.setRangeGridlinePaint(1.5.0/docs/api/java/awt/Color.html">Color.GRAY); |
96 | plot.setRangeGridlinePaint(1.5.0/docs/api/java/awt/Color.html">Color.GRAY); |
97 | plot.setRangeGridlinesVisible(true); |
97 | plot.setRangeGridlinesVisible(true); |
98 | plot.setRangeGridlineStroke(new 1.5.0/docs/api/java/awt/BasicStroke.html">BasicStroke(1.0f)); |
98 | plot.setRangeGridlineStroke(new 1.5.0/docs/api/java/awt/BasicStroke.html">BasicStroke(1.0f)); |
99 | renderer.setSeriesPaint(0, brown); |
99 | renderer.setSeriesPaint(0, brown); |
100 | renderer.setSeriesPaint(1, yellow); |
100 | renderer.setSeriesPaint(1, yellow); |
101 | renderer.setSeriesPaint(2, green); |
101 | renderer.setSeriesPaint(2, green); |
102 | renderer.setMaximumBarWidth(.20); |
102 | renderer.setMaximumBarWidth(.20); |
103 | 103 | ||
104 | renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator("{2}",pctFormat)); |
104 | renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator("{2}",pctFormat)); |
105 | renderer.setBaseItemLabelsVisible(true); |
105 | renderer.setBaseItemLabelsVisible(true); |
106 | ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.HALF_ASCENT_CENTER); |
106 | ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.HALF_ASCENT_CENTER); |
107 | renderer.setBasePositiveItemLabelPosition(position); |
107 | renderer.setBasePositiveItemLabelPosition(position); |
108 | renderer.setBaseItemLabelFont(new 1.5.0/docs/api/java/awt/Font.html">Font("Helvetica",1.5.0/docs/api/java/awt/Font.html">Font.PLAIN,30)); |
108 | renderer.setBaseItemLabelFont(new 1.5.0/docs/api/java/awt/Font.html">Font("Helvetica",1.5.0/docs/api/java/awt/Font.html">Font.PLAIN,30)); |
109 | 109 | ||
110 | chart.getLegend().setItemFont(new 1.5.0/docs/api/java/awt/Font.html">Font("Helvetica", 1.5.0/docs/api/java/awt/Font.html">Font.PLAIN,30)); |
110 | chart.getLegend().setItemFont(new 1.5.0/docs/api/java/awt/Font.html">Font("Helvetica", 1.5.0/docs/api/java/awt/Font.html">Font.PLAIN,30)); |
111 | chart.getLegend().setFrame(BlockBorder.NONE); |
111 | chart.getLegend().setFrame(BlockBorder.NONE); |
112 | 112 | ||
113 | 113 | ||
114 | 114 | ||
115 | 1.5.0/docs/api/java/awt/image/BufferedImage.html">BufferedImage image = chart.createBufferedImage( 300*4, 200*4); |
115 | 1.5.0/docs/api/java/awt/image/BufferedImage.html">BufferedImage image = chart.createBufferedImage( 300*4, 200*4); |
116 | 1.5.0/docs/api/java/lang/String.html">String pathGraficoTiposAlunos = Globals.TMP_DIR + java.io.1.5.0/docs/api/java/io/File.html">File.separator + tempName; |
116 | 1.5.0/docs/api/java/lang/String.html">String pathGraficoTiposAlunos = Globals.TMP_DIR + java.io.1.5.0/docs/api/java/io/File.html">File.separator + tempName; |
117 | java.io.1.5.0/docs/api/java/io/File.html">File output = new java.io.1.5.0/docs/api/java/io/File.html">File(pathGraficoTiposAlunos); |
117 | java.io.1.5.0/docs/api/java/io/File.html">File output = new java.io.1.5.0/docs/api/java/io/File.html">File(pathGraficoTiposAlunos); |
118 | 1.5.0/docs/api/javax/imageio/ImageIO.html">ImageIO.write(image, "png", new 1.5.0/docs/api/java/io/FileOutputStream.html">FileOutputStream(output)); |
118 | 1.5.0/docs/api/javax/imageio/ImageIO.html">ImageIO.write(image, "png", new 1.5.0/docs/api/java/io/FileOutputStream.html">FileOutputStream(output)); |
119 | 119 | ||
120 | FileUploaded fileUploaded = new FileUploaded(); |
120 | FileUploaded fileUploaded = new FileUploaded(); |
121 | fileUploaded.setTmpName(tempName); |
121 | fileUploaded.setTmpName(tempName); |
122 | fileUploaded.setTitle("Taxa global de aproveitamento"); |
122 | fileUploaded.setTitle("Taxa global de aproveitamento"); |
123 | fileUploaded.setDescription("Curso: " + courseReportDocument.getCourseName() + " (" + courseReportDocument.getCourseCode()+ ") ano " + courseReportDocument.getYear()); |
123 | fileUploaded.setDescription("Curso: " + courseReportDocument.getCourseName() + " (" + courseReportDocument.getCourseCode()+ ") ano " + courseReportDocument.getYear()); |
124 | fileUploaded.setContentType(MimeTypeGuesser.getInstance().guessMimeType(output)); |
124 | fileUploaded.setContentType(MimeTypeGuesser.getInstance().guessMimeType(output)); |
125 | fileUploaded.setFileSize(output.length()); |
125 | fileUploaded.setFileSize(output.length()); |
126 | fileUploaded.setExtension("png"); |
126 | fileUploaded.setExtension("png"); |
127 | return fileUploaded; |
127 | return fileUploaded; |
128 | } |
128 | } |
129 | 129 | ||
130 | public static void main(1.5.0/docs/api/java/lang/String.html">String [] args) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
130 | public static void main(1.5.0/docs/api/java/lang/String.html">String [] args) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
131 | float aprovados = 10; |
131 | float aprovados = 10; |
132 | float reprovados = 2; |
132 | float reprovados = 2; |
133 | float semElementos = 4; |
133 | float semElementos = 4; |
134 | double aprovadosPercent = ((int)10/16*100.0)/100.0; |
134 | double aprovadosPercent = ((int)10/16*100.0)/100.0; |
135 | double reprovadosPercent = ((int)2/16*100.0)/100.0; |
135 | double reprovadosPercent = ((int)2/16*100.0)/100.0; |
136 | double semElementosPercent = ((int)4/16*100.0)/100.0; |
136 | double semElementosPercent = ((int)4/16*100.0)/100.0; |
137 | 137 | ||
138 | 1.5.0/docs/api/java/lang/String.html">String tempName = BytesUtils.generateHexKey() + ".png"; |
138 | 1.5.0/docs/api/java/lang/String.html">String tempName = BytesUtils.generateHexKey() + ".png"; |
139 | 139 | ||
140 | DefaultPieDataset data = new DefaultPieDataset(); |
140 | DefaultPieDataset data = new DefaultPieDataset(); |
141 | if(reprovados > 0) |
141 | if(reprovados > 0) |
142 | data.setValue("Reprovados " + reprovadosPercent + "%", new 1.5.0/docs/api/java/lang/Double.html">Double(reprovados)); |
142 | data.setValue("Reprovados " + reprovadosPercent + "%", new 1.5.0/docs/api/java/lang/Double.html">Double(reprovados)); |
143 | if(aprovados > 0) |
143 | if(aprovados > 0) |
144 | data.setValue("Aprovados " + aprovadosPercent + "%", new 1.5.0/docs/api/java/lang/Double.html">Double(aprovados)); |
144 | data.setValue("Aprovados " + aprovadosPercent + "%", new 1.5.0/docs/api/java/lang/Double.html">Double(aprovados)); |
145 | if(semElementos > 0) |
145 | if(semElementos > 0) |
146 | data.setValue("Sem Elementos " + semElementosPercent + "%", new 1.5.0/docs/api/java/lang/Double.html">Double(semElementos)); |
146 | data.setValue("Sem Elementos " + semElementosPercent + "%", new 1.5.0/docs/api/java/lang/Double.html">Double(semElementos)); |
147 | JFreeChart chart = ChartFactory.createRingChart(null, data, false, true, false); |
147 | JFreeChart chart = ChartFactory.createRingChart(null, data, false, true, false); |
148 | chart.setBackgroundPaint(new 1.5.0/docs/api/java/awt/Color.html">Color(255,255,255)); |
148 | chart.setBackgroundPaint(new 1.5.0/docs/api/java/awt/Color.html">Color(255,255,255)); |
149 | PiePlot plot = (RingPlot) chart.getPlot(); |
149 | PiePlot plot = (RingPlot) chart.getPlot(); |
150 | plot.setLabelBackgroundPaint(new 1.5.0/docs/api/java/awt/Color.html">Color(255, 249, 235)); |
150 | plot.setLabelBackgroundPaint(new 1.5.0/docs/api/java/awt/Color.html">Color(255, 249, 235)); |
151 | plot.setLabelPaint(new 1.5.0/docs/api/java/awt/Color.html">Color(88, 88, 90)); |
151 | plot.setLabelPaint(new 1.5.0/docs/api/java/awt/Color.html">Color(88, 88, 90)); |
152 | //plot.setDrawingSupplier(new ChartBuilderUtil.ChartDrawingSupplier()); |
152 | //plot.setDrawingSupplier(new ChartBuilderUtil.ChartDrawingSupplier()); |
153 | 153 | ||
154 | plot.setSectionPaint(0, new 1.5.0/docs/api/java/awt/Color.html">Color(47, 35, 255)); |
154 | plot.setSectionPaint(0, new 1.5.0/docs/api/java/awt/Color.html">Color(47, 35, 255)); |
155 | plot.setSectionPaint(1, new 1.5.0/docs/api/java/awt/Color.html">Color(15, 218, 10)); |
155 | plot.setSectionPaint(1, new 1.5.0/docs/api/java/awt/Color.html">Color(15, 218, 10)); |
156 | plot.setSectionPaint(2, new 1.5.0/docs/api/java/awt/Color.html">Color(200, 200, 200)); |
156 | plot.setSectionPaint(2, new 1.5.0/docs/api/java/awt/Color.html">Color(200, 200, 200)); |
157 | plot.setBackgroundPaint(new 1.5.0/docs/api/java/awt/Color.html">Color(255, 255, 255)); |
157 | plot.setBackgroundPaint(new 1.5.0/docs/api/java/awt/Color.html">Color(255, 255, 255)); |
158 | plot.setOutlineVisible(false); |
158 | plot.setOutlineVisible(false); |
159 | 159 | ||
160 | 160 | ||
161 | 161 | ||
162 | plot.setLabelFont(new 1.5.0/docs/api/java/awt/Font.html">Font( |
162 | plot.setLabelFont(new 1.5.0/docs/api/java/awt/Font.html">Font( |
163 | "Helvetica", 1.5.0/docs/api/java/awt/Font.html">Font.PLAIN, 30)); |
163 | "Helvetica", 1.5.0/docs/api/java/awt/Font.html">Font.PLAIN, 30)); |
164 | 164 | ||
165 | 165 | ||
166 | 1.5.0/docs/api/java/awt/image/BufferedImage.html">BufferedImage image = chart.createBufferedImage( 300*4, 200*4); |
166 | 1.5.0/docs/api/java/awt/image/BufferedImage.html">BufferedImage image = chart.createBufferedImage( 300*4, 200*4); |
167 | 1.5.0/docs/api/java/lang/String.html">String pathGraficoTiposAlunos = Globals.TMP_DIR + java.io.1.5.0/docs/api/java/io/File.html">File.separator + tempName; |
167 | 1.5.0/docs/api/java/lang/String.html">String pathGraficoTiposAlunos = Globals.TMP_DIR + java.io.1.5.0/docs/api/java/io/File.html">File.separator + tempName; |
168 | java.io.1.5.0/docs/api/java/io/File.html">File output = new java.io.1.5.0/docs/api/java/io/File.html">File(pathGraficoTiposAlunos); |
168 | java.io.1.5.0/docs/api/java/io/File.html">File output = new java.io.1.5.0/docs/api/java/io/File.html">File(pathGraficoTiposAlunos); |
169 | 1.5.0/docs/api/javax/imageio/ImageIO.html">ImageIO.write(image, "png", new 1.5.0/docs/api/java/io/FileOutputStream.html">FileOutputStream(output)); |
169 | 1.5.0/docs/api/javax/imageio/ImageIO.html">ImageIO.write(image, "png", new 1.5.0/docs/api/java/io/FileOutputStream.html">FileOutputStream(output)); |
170 | 170 | ||
171 | 171 | ||
172 | } |
172 | } |
173 | } |
173 | } |
174 | 174 |