// Use this for initialization void Start() { // Set pointlist to results of function Reader with argument inputfile CSVläsare.Read(MainMenu.fileData); pointList = CSVläsare.pointList; targetFeatures = CSVläsare.targetFeatures; // Declare list of strings, fill with keys (column names) columnList = new List <string>(pointList[1].Keys); // FeatureList without first and last index: Id / TargetColumn featureList = new List <string>(); featureList.AddRange(columnList); featureList.RemoveAt(columnList.Count - 1); featureList.RemoveAt(0); nFeatures = featureList.Count; ThisInstans = this; AddDropdownListeners(); PlottData(); // Set Camera position Camera.main.transform.position = new Vector3(19.3F, 22.5F, -45.7F); }
// Use this for initialization void Start() { // Set pointlist to results of function Reader with argument inputfile CSVläsare.Read(MainMenu.fileData); ThisInstans = this; targetFeatures = CSVläsare.targetFeatures; pointList = CSVläsare.pointList; // Declare list of strings, fill with keys (column names) columnList = CSVläsare.columnList; List <string> features = columnList.GetRange(1, columnList.Count - 2); AddDropDownListeners(features); PlottData(); }
// Use this for initialization void Start() { CSVläsare.Read(MainMenu.fileData); pointList = CSVläsare.pointList; ThisInstans = this; columnList = new List <string>(pointList[1].Keys); columnListDropDown = new List <string>(pointList[1].Keys); columnListDropDown.RemoveAt(columnList.Count() - 1); columnListDropDown.RemoveAt(0); for (int i = 0; i < dropDownList.Length - 1; i++) { dropDownList[i].AddOptions(columnListDropDown); dropDownList[i].value = i; dropDownList[i].onValueChanged.AddListener(delegate { DropdownValueChanged(); }); } PlottData(); }
// Start is called before the first frame update void Start() { ThisInstans = this; // Set pointlist to results of function Reader with argument inputfile CSVläsare.Read(MainMenu.fileData); pointList = CSVläsare.pointList; // Declare list of strings, fill with keys (column names) columnList = new List <string>(pointList[1].Keys); // FeatureList without first and last index: Id / TargetColumn featureList = new List <string>(); featureList.AddRange(columnList); featureList.RemoveAt(columnList.Count - 1); featureList.RemoveAt(0); nFeatures = featureList.Count; // Set correct number of vertices in LinePrefab depending on dataset if (nFeatures <= 4) { LinePrefab.GetComponent <LineRenderer>().positionCount = nFeatures; } else { LinePrefab.GetComponent <LineRenderer>().positionCount = 4; } AddDropdownListeners(); // Default values for each columntext at start, depending on nFeatures (max 4) for (int i = 0; i < nFeatures; i++) { columnTextList[i].text = featureList[i]; if (i + 1 == 4) { break; } } GetDistinctTargetFeatures(); if (targetFeatures.Count() <= 10) { InstantiateTargetFeatureList(); } else { targetColorList = new Color[4, pointList.Count]; } DrawBackgroundGrid(); // Run the default startup plot for (int i = 0; i < nFeatures; i++) { PlotData(i, i + 1); if (i + 1 == 4) { break; } } }