private void Form1_Load(object sender, EventArgs e) { string dir = Directory.GetCurrentDirectory(); string iDataPath = "\\..\\..\\..\\data\\"; string iDBFileName = "dbEurope.bin"; renderer = new Renderer(this); doc = new GMSDocument(); doc.ReadDB(dir + iDataPath + iDBFileName); doc.SetupFilteredData("countries_acronyms_europe.txt"); doc.SetupSortedData(); pcCountries = new ParallelPlotCountries(doc.GetFilteredDataCube() , doc.GetFilteredCountryNames() , panel1 , renderer , doc.iFilteredColorMap , doc , GetGroupBox() ); mapPlot = new MapPlot(doc.GetFilteredDataCube() , PCMapSplitContainer.Panel1 , renderer , doc.iFilteredColorMap , pcCountries.iPcPlot , doc ); // Initialize Tree Map iTreeMap = new TreeMap(mainSplitContainer.Panel2, doc, pcCountries.iPcPlot); int quantitativeDataIndex, ordinalDataIndex, idIndex, leafNodeIndex; List <GMSToolTipComponent> toolTipComponents = new List <GMSToolTipComponent>(); // Build the TreeMap Data << Countries releases per Styles >> object[, ,] data = doc.BuildStylesAreasTree(out quantitativeDataIndex, out ordinalDataIndex, out idIndex, out leafNodeIndex, toolTipComponents); iTreeMap.SetData(data, quantitativeDataIndex, ordinalDataIndex, idIndex, leafNodeIndex, toolTipComponents); iTreeMap.UpdateScale(); iTreeMap.ColorMap = doc.iFilteredColorMap; pcCountries.iPcPlot.FilterChanged += new EventHandler(pcPlot_FilterChanged); this.glyphPanel.Show(); this.ShowInformationBox(); }
/// <summary> /// /// </summary> private void InitializeTreeMap() { int quantitativeDataIndex, ordinalDataIndex, idIndex, leafNodeIndex; List <GMSToolTipComponent> toolTipComponents = new List <GMSToolTipComponent>(); object[, ,] countriesColorMapData; object[, ,] data; ColorMap map; switch (iTreeMapType) { case TREEMAP_TYPE.GOV_TYPES: data = iDoc.BuildGovernmentTypeAreasTree(out quantitativeDataIndex, out ordinalDataIndex, out idIndex, out leafNodeIndex, toolTipComponents, out countriesColorMapData); map = CreateColorMap(countriesColorMapData); break; case TREEMAP_TYPE.STYLES_PER_COUNTRY: data = iDoc.BuildCountriesAreasTree(out quantitativeDataIndex, out ordinalDataIndex, out idIndex, out leafNodeIndex, toolTipComponents, out countriesColorMapData); map = CreateColorMap(countriesColorMapData); break; case TREEMAP_TYPE.COUNTRIES_PER_STYLE: default: data = iDoc.BuildStylesAreasTree(out quantitativeDataIndex, out ordinalDataIndex, out idIndex, out leafNodeIndex, toolTipComponents); map = iSharedColorMap; break; } iTreeMap.SetData(data, quantitativeDataIndex, ordinalDataIndex, idIndex, leafNodeIndex, toolTipComponents); iTreeMap.UpdateScale(); iTreeMap.ColorMap = map; }