/********************************************************************** # Copyright (c) EWA Systems Inc. 1998 - 2005 All Rights Reserved # No part of this program may be photocopied, reproduced, # or translated to another programming language without # the prior written consent of EWA Systems. **********************************************************************/ package com.ewasystems.chart.test; import java.awt.Color; import com.ewasystems.chart.AxesXY; import com.ewasystems.chart.Chart; import com.ewasystems.chart.ChartData; import com.ewasystems.chart.FillPaint; import com.ewasystems.chart.JFrameChart; /** *
Title: Sample Painted Area Chart
*Copyright: (c) 1998 - 2005
*Company: EWA Systems, Inc.
* @author Lincoln Evans-Beauchamp * @version 1.0 */ public class SampleAreaPaint extends JFrameChart { public SampleAreaPaint() { Chart chart = getChart(); AxesXY axis = new AxesXY(chart); chart.getChartLegend().setPaint(true); double y1[] = {4, -6, 2, 1, -8}; ChartData data1 = new ChartData(axis, y1); data1.setTitle("Area"); data1.setDataType(ChartData.DATA_TYPE_FILL); data1.setFillType(ChartData.FILL_TYPE_PAINT); data1.setFillPaint(FillPaint.crosshatch(10,5,Color.red,Color.yellow)); double y2[] = {5, -3, 6, -7, 2}; ChartData data2 = new ChartData(axis, y2); data2.setTitle("Marker"); data2.setDataType(ChartData.DATA_TYPE_MARKER); data2.setMarkerColor(Color.blue); data2.setMarkerType(ChartData.MARKER_TYPE_FILLED_CIRCLE); } public static void main(String argv[]) { new SampleAreaPaint().setVisible(true); } public String toString() {return "Sample Area Paint";} }