List of usage examples for org.jfree.chart.renderer.xy XYBubbleRenderer SCALE_ON_DOMAIN_AXIS
int SCALE_ON_DOMAIN_AXIS
To view the source code for org.jfree.chart.renderer.xy XYBubbleRenderer SCALE_ON_DOMAIN_AXIS.
Click Source Link
From source file:edu.gmu.cs.sim.util.media.chart.BubbleChartGenerator.java
protected void buildChart() { DefaultXYZDataset dataset = new DefaultXYZDataset(); chart = ChartFactory.createBubbleChart("Untitled Chart", "Untitled X Axis", "Untitled Y Axis", dataset, PlotOrientation.VERTICAL, false, true, false); chart.setAntiAlias(true);/* w w w . j a v a2 s. c om*/ chartPanel = buildChartPanel(chart); setChartPanel(chartPanel); // most irritating: you can't change the scale type once you've // constructed the renderer. :-( chart.getXYPlot().setRenderer(new XYBubbleRenderer(XYBubbleRenderer.SCALE_ON_DOMAIN_AXIS)); // this must come last because the chart must exist for us to set its dataset setSeriesDataset(dataset); }
From source file:edu.ucla.stat.SOCR.motionchart.MotionChart.java
/** * Creates a new chart with the given title and dataset. The * <code>createLegend</code> argument specifies whether or not a legend * should be added to the chart./*from ww w . ja va2 s .c om*/ * * @param title the chart title (<code>null</code> permitted). * @param titleFont the font for displaying the chart title * (<code>null</code> permitted). * @param dataset the dataset * (<code>null</code> not permitted). * @param createLegend a flag indicating whether or not a legend should * be created for the chart. */ public MotionChart(String title, Font titleFont, MotionDataSet dataset, boolean createLegend) { if (dataset == null) { throw new NullPointerException("Null 'dataset' argument."); } this.dataset = dataset; NumberAxis xAxis = new NumberAxis(dataset.getXLabel()); xAxis.setAutoRangeIncludesZero(false); xAxis.setUpperMargin(0.20); NumberAxis yAxis = new NumberAxis(dataset.getYLabel()); yAxis.setAutoRangeIncludesZero(false); yAxis.setUpperMargin(0.20); plot = new XYPlot(dataset, xAxis, yAxis, null); renderer = new MotionBubbleRenderer(dataset, XYBubbleRenderer.SCALE_ON_DOMAIN_AXIS); renderer.setBaseToolTipGenerator(new MotionToolTipGenerator()); renderer.setBaseItemLabelGenerator(new MotionItemLabelGenerator()); renderer.setBasePositiveItemLabelPosition( new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER)); plot.setRenderer(renderer); plot.setOrientation(PlotOrientation.VERTICAL); dataset.addChangeListener(this); chart = new JFreeChart(title, titleFont, plot, createLegend); chart.addChangeListener(this); currentTheme.apply(chart); chartPanel = new ChartPanel(chart); chartPanel.addChartMouseListener(new MotionMouseListener()); }
From source file:net.sf.jasperreports.engine.xml.JRXmlConstants.java
/** * @deprecated Replaced by {@link ScaleTypeEnum}. *//*from w ww . java 2 s . c o m*/ public static Map getScaleTypeMap() { if (scaleTypeMap == null) { Map map = new HashMap(8); map.put(SCALE_ON_BOTH_AXES, Integer.valueOf(XYBubbleRenderer.SCALE_ON_BOTH_AXES)); map.put(SCALE_ON_DOMAIN_AXIS, Integer.valueOf(XYBubbleRenderer.SCALE_ON_DOMAIN_AXIS)); map.put(SCALE_ON_RANGE_AXIS, Integer.valueOf(XYBubbleRenderer.SCALE_ON_RANGE_AXIS)); map.put(Integer.valueOf(XYBubbleRenderer.SCALE_ON_BOTH_AXES), SCALE_ON_BOTH_AXES); map.put(Integer.valueOf(XYBubbleRenderer.SCALE_ON_DOMAIN_AXIS), SCALE_ON_DOMAIN_AXIS); map.put(Integer.valueOf(XYBubbleRenderer.SCALE_ON_RANGE_AXIS), SCALE_ON_RANGE_AXIS); scaleTypeMap = Collections.unmodifiableMap(map); } return scaleTypeMap; }