/* 
 * Isomorphic SmartGWT web presentation layer 
 * Copyright 2000 and beyond Isomorphic Software, Inc. 
 * 
 * OWNERSHIP NOTICE 
 * Isomorphic Software owns and reserves all rights not expressly granted in this source code, 
 * including all intellectual property rights to the structure, sequence, and format of this code 
 * and to all designs, interfaces, algorithms, schema, protocols, and inventions expressed herein. 
 * 
 *  If you have any questions, please email <sourcecode@isomorphic.com>. 
 * 
 *  This entire comment must accompany any portion of Isomorphic Software source code that is 
 *  copied or moved from this file. 
 */

import java.util.Random;
import com.smartgwt.client.data.Record;

public class ScatterPlotChartData extends Record {

	public ScatterPlotChartData() {
	}

	public ScatterPlotChartData(float time, float value, String animal) {
		setAttribute("Time", time);
		setAttribute("value", value);
		setAttribute("animal", animal);
	}

	public ScatterPlotChartData[] getData() {
		final Random rand = new Random();
		final float x = 5.0f + rand.nextFloat();

		return new ScatterPlotChartData[] {
				new ScatterPlotChartData(0.033f, 0.02f * x, "Moose"),
				new ScatterPlotChartData(0.083f, 0.15f * x, "Moose"),
				new ScatterPlotChartData(0.25f, 0.77f * x, "Moose"),
				new ScatterPlotChartData(0.25f, 0.77f * x, "Moose"),

				new ScatterPlotChartData(0.5f, 0.87f * x, "Moose"),
				new ScatterPlotChartData(1f, 1.15f * x, "Moose"),
				new ScatterPlotChartData(2f, 1.15f * x, "Moose"),
				new ScatterPlotChartData(4f, 0.71f * x, "Moose"),

				new ScatterPlotChartData(5f, 0.67f * x, "Moose"),
				new ScatterPlotChartData(6f, 0.61f * x, "Moose"),
				new ScatterPlotChartData(7f, 0.41f * x, "Moose"),
				new ScatterPlotChartData(8f, 0.22f * x, "Moose"),

				new ScatterPlotChartData(0.033f, 0.02f * x, "Platypus"),
				new ScatterPlotChartData(0.083f, 0.28f * x, "Platypus"),
				new ScatterPlotChartData(0.25f, 0.71f * x, "Platypus"),
				new ScatterPlotChartData(0.5f, 0.81f * x, "Platypus"),

				new ScatterPlotChartData(1f, 1.06f * x, "Platypus"),
				new ScatterPlotChartData(2f, 1.06f * x, "Platypus"),
				new ScatterPlotChartData(4f, 0.52f * x, "Platypus"),
				new ScatterPlotChartData(8f, 0.10f * x, "Platypus") };
	}
}
