List of usage examples for org.jfree.chart StandardChartTheme StandardChartTheme
public StandardChartTheme(String name)
From source file:uk.ac.ed.epcc.webapp.charts.jfreechart.JFreeSetup.java
public static void setup() { StandardChartTheme theme = new StandardChartTheme("webapp"); theme.setSmallFont(new Font("Arial", Font.PLAIN, 10)); theme.setRegularFont(new Font("Arial", Font.PLAIN, 12)); theme.setLargeFont(new Font("Arial", Font.PLAIN, 14)); theme.setExtraLargeFont(new Font("Arial", Font.PLAIN, 20)); ChartFactory.setChartTheme(theme);//ww w . ja v a 2 s .co m }
From source file:com.ouc.cpss.view.EmpSaleChartBuilder.java
private static JFreeChart createJFreeChart(CategoryDataset dataset) { /**//from w w w.ja v a 2 s. c o m * JFreeChart */ //? StandardChartTheme standardChartTheme = new StandardChartTheme("CN"); // standardChartTheme.setExtraLargeFont(new Font("", Font.BOLD, 20)); // standardChartTheme.setRegularFont(new Font("", Font.PLAIN, 15)); //? standardChartTheme.setLargeFont(new Font("", Font.PLAIN, 15)); //? ChartFactory.setChartTheme(standardChartTheme); //? JFreeChart jfreeChart = ChartFactory.createBarChart3D("", "", "?", dataset, PlotOrientation.VERTICAL, true, false, false); /** * JFreeChart */ jfreeChart.setTitle(new TextTitle("", new Font("", Font.BOLD + Font.ITALIC, 20))); CategoryPlot plot = (CategoryPlot) jfreeChart.getPlot(); CategoryAxis categoryAxis = plot.getDomainAxis(); categoryAxis.setLabelFont(new Font("", Font.ROMAN_BASELINE, 12)); return jfreeChart; }
From source file:jamel.gui.charts.JamelChart.java
/** * Returns the standard chart theme./*from w w w .ja v a2 s . c o m*/ * @return the standard chart theme. */ private static StandardChartTheme getNewChartTheme() { StandardChartTheme theme = new StandardChartTheme("Standard Chart Theme"); float size = theme.getExtraLargeFont().getSize2D(); Font titleFont = theme.getExtraLargeFont().deriveFont(size - 4); theme.setExtraLargeFont(titleFont); Font axisFont = theme.getRegularFont(); theme.setLargeFont(axisFont); theme.setChartBackgroundPaint(new Color(0, 0, 0, 1)); theme.setPlotBackgroundPaint(Color.WHITE); theme.setDomainGridlinePaint(Color.GRAY); theme.setRangeGridlinePaint(Color.GRAY); return theme; }
From source file:com.ouc.cpss.view.SupTradeChartBuilder.java
private static JFreeChart createJFreeChart(PieDataset dataset) { /**//from ww w . j a v a 2 s . c o m * JFreeChart */ //? StandardChartTheme standardChartTheme = new StandardChartTheme("CN"); // standardChartTheme.setExtraLargeFont(new Font("", Font.BOLD, 20)); // standardChartTheme.setRegularFont(new Font("", Font.PLAIN, 15)); //? standardChartTheme.setLargeFont(new Font("", Font.PLAIN, 15)); //? ChartFactory.setChartTheme(standardChartTheme); //?? //createPieChart 2D; createPieChart3D 3D JFreeChart chart = ChartFactory.createPieChart("", dataset, true, true, false); //,? chart.setTitle(new TextTitle("", new Font("", Font.ITALIC, 22))); //? LegendTitle legend = chart.getLegend(0); //,ture,? legend.setItemFont(new Font("", Font.BOLD, 20)); //?(??) PiePlot plot = (PiePlot) chart.getPlot(); //?==? plot.setLabelFont(new Font("", Font.BOLD, 22)); // plot.setBaseSectionOutlinePaint(Color.BLUE); // plot.setBaseSectionOutlineStroke(new BasicStroke(0.5f)); //?,??,?? plot.setDirection(Rotation.CLOCKWISE);//,Rotation.CLOCKWISE //() plot.setStartAngle(70); //??? //plot.setExplodePercent(1, 0.5D); //plot.setExplodePercent("One", 0.5D); //,3D? plot.setExplodePercent(dataset.getKey(0), 0.1d); // plot.setLabelLinkPaint(Color.BLUE); // plot.setLabelOutlinePaint(Color.black); // plot.setLabelShadowPaint(Color.RED); // plot.setSectionPaint(1, Color.BLACK); // :,{0},{1},{2}?,??? plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}:{1}\r\n{2}", NumberFormat.getNumberInstance(), new DecimalFormat("0.00%"))); // plot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator("{0}={2}")); //:(true),(false) plot.setCircular(true); //? plot.setNoDataMessage("??..."); //??? plot.setToolTipGenerator(new StandardPieToolTipGenerator()); // //plot.setURLGenerator(new StandardPieURLGenerator("detail.jsp")); return chart; }
From source file:com.ouc.cpss.view.ChartProBuilder.java
private static JFreeChart createJFreeChart(CategoryDataset dataset) { /**// www . j a va 2 s .c om * JFreeChart */ //? StandardChartTheme standardChartTheme = new StandardChartTheme("CN"); // standardChartTheme.setExtraLargeFont(new Font("", Font.BOLD, 20)); // standardChartTheme.setRegularFont(new Font("", Font.PLAIN, 15)); //? standardChartTheme.setLargeFont(new Font("", Font.PLAIN, 15)); //? ChartFactory.setChartTheme(standardChartTheme); //? // ? JFreeChart jfreeChart = null; if (choice == 1) { jfreeChart = ChartFactory.createBarChart3D("? -- ?TOP10", "", "?", dataset, PlotOrientation.VERTICAL, true, false, false); /** * JFreeChart */ jfreeChart.setTitle(new TextTitle("? -- ?TOP10", new Font("", Font.BOLD + Font.ITALIC, 20))); CategoryPlot plot = (CategoryPlot) jfreeChart.getPlot(); CategoryAxis categoryAxis = plot.getDomainAxis(); categoryAxis.setLabelFont(new Font("", Font.ROMAN_BASELINE, 12)); } else { jfreeChart = ChartFactory.createBarChart3D("? -- ?TOP10", "", "?", dataset, PlotOrientation.VERTICAL, true, false, false); jfreeChart.setTitle(new TextTitle("? -- ?TOP10", new Font("", Font.BOLD + Font.ITALIC, 20))); CategoryPlot plot = (CategoryPlot) jfreeChart.getPlot(); CategoryAxis categoryAxis = plot.getDomainAxis(); categoryAxis.setLabelFont(new Font("", Font.ROMAN_BASELINE, 12)); } return jfreeChart; }
From source file:com.vectorprint.report.itext.style.stylers.DefaultChartThemeBuilder.java
/** * returns a new instance of {@link StandardChartTheme}, does not use the settings to configure it. * @param settings//from w w w . j a v a2 s. co m * @return */ @Override public ChartTheme fromSettings(EnhancedMap settings) { return new StandardChartTheme("StandardChartTheme"); }
From source file:info.financialecology.finance.utilities.datastruct.VersatileChart.java
public VersatileChart() { this(new StandardChartTheme("standard_theme"), 1, 1, true); }
From source file:info.financialecology.finance.utilities.datastruct.VersatileChart.java
public VersatileChart(Boolean ticks) { this(new StandardChartTheme("standard_theme"), 1, 1, ticks); }
From source file:info.financialecology.finance.utilities.datastruct.VersatileChart.java
public VersatileChart(int rows, int cols, Boolean ticks) { this(new StandardChartTheme("standard_theme"), rows, cols, ticks); }
From source file:org.cds06.speleograph.GraphPanel.java
/** * Construct a new GraphPanel for an application instance. * * @param app The instance which should be linked with this Chart. *///from w w w .jav a2 s .c o m public GraphPanel(SpeleoGraphApp app) { Validate.notNull(app); application = app; setLayout(new BorderLayout()); dateAxis = new DateAxis(); plot = new SpeleoXYPlot(); chart = new JFreeChart(plot); new StandardChartTheme("JFree").apply(chart); // NON-NLS chartPanel = new ChartPanel(chart, false, true, false, true, true); chartPanel.addChartMouseListener(this); setupEmptyChart(); Series.setGraphPanel(this); chartPanel.setPopupMenu(null); chartPanel.setMouseWheelEnabled(true); chartPanel.setMouseZoomable(false); chartPanel.setDomainZoomable(true); add(chartPanel); log.info("GraphPanel is initialized"); }