public ParallelCoordinatesControl(ParallelCoordinates model)
 {
     InitializeComponent();
     Model = model;
     PlotColor = new SolidColorBrush() { Color = Color.FromArgb(255, 0, 0, 255) };
     PlotColorName = "Blue";
     CoordinateDistance = 30;
 }
 public ParallelCoordinatesControl(ParallelCoordinates model)
 {
     InitializeComponent();
     Model = model;
     StartColor = Colors.Blue;
     StartColorName = "Blue";
     StopColor = Colors.Green;
     StopColorName = "Green";
     CoordinateDistance = 30;
 }
    void Update()
    {
        if (Input.GetKeyDown("up") || Input.GetKeyDown("right") || Input.GetButtonDown("Gamepad_B"))
        {
            year++;
            if (year > 2015)
            {
                year = 2009;
                yearSliderBox.position             = new Vector3(-220, yearSliderBox.position.y, yearSliderBox.position.z);
                currentYearText.transform.position = currentYearText.transform.position - new Vector3(380, 0, 0);
            }
            else
            {
                yearSliderBox.position             = yearSliderBox.position + new Vector3((380f / 6f), 0, 0);
                currentYearText.transform.position = currentYearText.transform.position + new Vector3((380f / 6f), 0, 0);
            }
            Debug.Log("Increased year to: " + year);
            RefreshMap();
            ParallelCoordinates.Update();
            if (upper.generated)
            {
                upper.RefreshGraph();
            }
            if (mid.generated)
            {
                mid.RefreshGraph();
            }
            if (lower.generated)
            {
                lower.RefreshGraph();
            }
        }

        if (Input.GetKeyDown("down") || Input.GetKeyDown("left") || Input.GetButtonDown("Gamepad_X"))
        {
            year--;
            if (year < 2009)
            {
                year = 2015;
                yearSliderBox.position             = new Vector3(160, yearSliderBox.position.y, yearSliderBox.position.z);
                currentYearText.transform.position = currentYearText.transform.position + new Vector3(380, 0, 0);
            }
            else
            {
                yearSliderBox.position             = yearSliderBox.position - new Vector3((380f / 6f), 0, 0);
                currentYearText.transform.position = currentYearText.transform.position - new Vector3((380f / 6f), 0, 0);
            }
            Debug.Log("Decreased year to: " + year);
            RefreshMap();
            ParallelCoordinates.Update();
            if (upper.generated)
            {
                upper.RefreshGraph();
            }
            if (mid.generated)
            {
                mid.RefreshGraph();
            }
            if (lower.generated)
            {
                lower.RefreshGraph();
            }
        }
    }