本文整理汇总了Java中org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.getBaseShape方法的典型用法代码示例。如果您正苦于以下问题:Java XYLineAndShapeRenderer.getBaseShape方法的具体用法?Java XYLineAndShapeRenderer.getBaseShape怎么用?Java XYLineAndShapeRenderer.getBaseShape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
的用法示例。
在下文中一共展示了XYLineAndShapeRenderer.getBaseShape方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateGraph
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
void updateGraph(){
//System.out.println("UpdateGraph get called")
calculate();
XYSeriesCollection ds = createDataset();
JFreeChart chart = ChartFactory.createXYLineChart(
title, // chart title
xAxis, // x axis label
yAxis, // y axis label
ds, // data
PlotOrientation.VERTICAL,
true, // include legend
true, // tooltips
false // urls
);
chart.setBackgroundPaint(Color.white);
XYPlot subplot1 = (XYPlot) chart.getPlot();
XYLineAndShapeRenderer renderer1
= (XYLineAndShapeRenderer) subplot1.getRenderer();
renderer1.setSeriesPaint(0, Color.red);
renderer1.setSeriesPaint(1, Color.blue);
Shape shape = renderer1.getBaseShape();
renderer1.setSeriesShape(2, shape);
renderer1.setSeriesShape(3, shape);
renderer1.setBaseLinesVisible(true);
renderer1.setBaseShapesVisible(true);
renderer1.setBaseShapesFilled(true);
renderer1.setSeriesShapesVisible(0, false);
NumberAxis rangeAxis = (NumberAxis)subplot1.getRangeAxis();
rangeAxis.setAutoRangeIncludesZero(false);
chartPanel = new ChartPanel(chart, false);
chartPanel.setPreferredSize(new Dimension(CHART_SIZE_X,CHART_SIZE_Y));
upContainer= new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(leftPanel), new JScrollPane(chartPanel));
this.getMainPanel().removeAll();
this.getMainPanel().add(new JScrollPane(upContainer), BorderLayout.CENTER);
this.getMainPanel().validate();
// getRecordTable().setText("Any Explaination goes here.");
//
}