Пример #1
0
        public CountriesTreeMapForm(GMSDocument aDoc, string aTreeMapType,
                                    ToolStripComboBox aTreeMapCombo, ColorMap aSharedColorMap, ParallelCoordinatesPlot aPcPlot)
        {
            InitializeComponent();

            iDoc            = aDoc;
            iTreeMap        = new TreeMap(mainPanel, iDoc, aPcPlot);
            iLoaded         = false;
            iTreeMapType    = GetTreeMapType(aTreeMapType);
            iTreeMapCombo   = aTreeMapCombo;
            iSharedColorMap = aSharedColorMap;
        }
Пример #2
0
        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();
        }