/********************************************************************** # 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.JFrameChart; import com.ewasystems.chart.bar.ChartBar; /** *
Title: Sample Bar Chart
*Copyright: (c) 1998 - 2005
*Company: EWA Systems, Inc.
* @author Lincoln Evans-Beauchamp * @version 1.0 */ public class SampleBar extends JFrameChart { public SampleBar() { Chart chart = getChart(); AxesXY axes = new AxesXY(chart); double y[] = {4, 2, 3, 9}; ChartBar bar = new ChartBar(axes, y); bar.setBarType(ChartBar.BAR_TYPE_VERTICAL); bar.setLabels(new String[]{"A", "B", "C", "D"}); bar.setFillColor(Color.red); } public static void main(String argv[]) { new SampleBar().setVisible(true); } public String toString() {return "Sample Bar";} }