Example #1
0
        public MapPlot(DataCube aDataCube, Panel aDestinationPanel, Renderer aRenderer,
                       ColorMap aColorMap, ParallelCoordinatesPlot aPcPlot, GMSDocument aDoc)
        {
            iDataCube = aDataCube;
            iPanel    = aDestinationPanel;
            renderer  = aRenderer;
            iColorMap = aColorMap;

            iPcPlot         = aPcPlot;
            iDoc            = aDoc;
            iLegendColorMap = iDoc.iFilteredSelectedColorMap;

            SetupMapLayers();

            //Get country names
            iCountryNames = iDoc.GetFilteredCountryNames();

            //Prepare tooltip
            iToolTip            = new GavToolTip(iPanel);
            iToolTip.FadeEnable = true;
            iToolTip.FadeTime   = TOOLTIP_FADE_DELAY;
            iToolTip.Show(new Point(0, 0));
            iToolTip.Hide();

            iMouseHoverControl           = new MouseHoverController(iPanel, TOOLTIP_SENSITIVITY, TIMER_DELAY);
            iMouseHoverControl.Hover    += new EventHandler(iMouseHoverControl_Hover);
            iMouseHoverControl.HoverEnd += new EventHandler(iMouseHoverControl_HoverEnd);

            iDoc.Picked          += new EventHandler <IndexesPickedEventArgs>(DocumentPicked);
            iDoc.ColorMapChanged += new EventHandler <EventArgs>(DocumentColorMapChanged);
        }
Example #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public TreeMap(System.Windows.Forms.Panel aPanel, GMSDocument aDoc, ParallelCoordinatesPlot aPcPlot)
        {
            iPanel              = aPanel;
            iPanel.SizeChanged += new EventHandler(SizeChanged);
            iPanel.Paint       += new System.Windows.Forms.PaintEventHandler(Paint);
            iToolTip            = new GavToolTip(iPanel);

            iPcPlot = aPcPlot;

            iToolTip.FadeEnable = true;
            iToolTip.FadeTime   = TOOLTIP_FADE_DELAY;
            iToolTip.Show(new Point(0, 0));
            iToolTip.Hide();

            iPanel.MouseLeave           += new EventHandler(MouseHoverControlHoverEnd);
            iMouseHoverControl           = new MouseHoverController(iPanel, 5, TIMER_DELAY);
            iMouseHoverControl.Hover    += new EventHandler(MouseHoverControlHover);
            iMouseHoverControl.HoverEnd += new EventHandler(MouseHoverControlHoverEnd);

            iDoc = aDoc;

            aDoc.ColorMapChanged += new EventHandler <EventArgs>(DocumentColorMapChanged);
            iDoc.Picked          += new EventHandler <IndexesPickedEventArgs>(DocumentPicked);

            iPanel.MouseDown += new MouseEventHandler(MouseDown);
            iSelectedIds      = new List <int>();


            iZoomIn = false;

            UpdateDrawingArea();
        }
Example #3
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;
        }
Example #4
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();
        }
Example #5
0
        public ParallelPlotCountries(DataCube aDataCube, List <string> aCountryNames, Panel aDestinationPanel,
                                     Renderer aRenderer, ColorMap aColorMap, GMSDocument aDoc, ToolStripComboBox aGroupBox)
        {
            iDataCube     = aDataCube;
            iCountryNames = aCountryNames;
            iColorMap     = aColorMap;
            iGroupBox     = aGroupBox;

            iPanel   = aDestinationPanel;
            renderer = aRenderer;
            headers  = new List <string>();
            iDoc     = aDoc;

            InitKMeans(aDataCube);
            SetupView();

            iDoc.Picked          += new EventHandler <IndexesPickedEventArgs>(DocumentPicked);
            iDoc.ColorMapChanged += new EventHandler <EventArgs>(DocumentColorMapChanged);
        }