/*
 * $Id: TestGraph.java,v 1.5 2006/07/17 20:22:40 larry Exp $ 
 */
package com.representqueens.spark;

/*
 * 
 * Copyright 2006 Larry Ogrodnek
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;


/**
 * @author Larry Ogrodnek <larry@cheesesteak.net>
 * @version $Revision: 1.5 $ $Date: 2006/07/17 20:22:40 $
 */
public class TestGraph
{

  public static void main(final String[] args)
  throws IOException
  {
    final Number[] data = {3, 5, 3, 7, 20, 17, 12, 4, 13, 11, 7, 20, 17, 7, 9, 8, 10, 12};
    final BufferedImage i = BarGraph.createGraph(data);
    //final BufferedImage i = LineGraph.createGraph(data);
    
    final File file = new File(args[0]);
    
    ImageIO.write(i, "png", file);
  }

}
