本文整理匯總了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.");
//
}