Example #1
0
        /// <summary>
        /// Display plot by category
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CategoryButton_Click(object sender, RoutedEventArgs e)
        {
            a_isCategoryPlot          = true;
            CategoryButton.FontWeight = FontWeights.Bold;
            LevelButton.FontWeight    = FontWeights.Regular;
            ParseByCategoryAndLevel();
            ColumnSeriesByCategory columnSeriesByCategory = new ColumnSeriesByCategory(a_categoryPlotData);

            MainPlotView.Model = columnSeriesByCategory.MyModel;
        }
Example #2
0
 /// <summary>
 /// Refresh plot after data change
 /// </summary>
 private void RefreshPlot()
 {
     if (a_isInitialing == false)
     {
         if (a_isCategoryPlot)
         {
             ParseByCategoryAndLevel();
             ColumnSeriesByCategory columnSeriesByCategory = new ColumnSeriesByCategory(a_categoryPlotData);
             MainPlotView.Model = columnSeriesByCategory.MyModel;
         }
         else
         {
             ParseByCategoryAndLevel();
             BarSeriesByLevel barSeriesByLevel = new BarSeriesByLevel(a_levelPlotData);
             MainPlotView.Model = barSeriesByLevel.MyModel;
         }
     }
 }
Example #3
0
        /// <summary>
        /// Beacon main UI
        /// </summary>
        /// <param name="revitReader">Provide RevitReader instance</param>
        public MainUI(RevitReader revitReader)
        {
            InitializeComponent();
            a_RevitReader     = revitReader;
            RatingLeft.Fill   = new SolidColorBrush(Colors.White);
            RatingCenter.Fill = new SolidColorBrush(Colors.White);
            RatingRight.Fill  = new SolidColorBrush(Colors.White);

            // Set Icon
            this.Icon = App.BeaconIcon;

            // Building Types
            a_buildingTypes = new List <string>()
            {
                "Commercial", "Residential", "Education", "Health Care", "Lodging", "Mixed", "Multi-Family", "Office", "Public Assembly", "Other"
            };
            BuildingUseComboBox.ItemsSource   = a_buildingTypes;
            BuildingUseComboBox.SelectedIndex = 0;

            // Initialize GWP
            InitializeGwpData();

            // Parse Revit Data
            ParseByCategoryAndLevel();

            // Display Plot
            ColumnSeriesByCategory columnSeriesByCategory = new ColumnSeriesByCategory(a_categoryPlotData);

            MainPlotView.Model = columnSeriesByCategory.MyModel;
            // Change to display bar values on hover instead of click.
            OxyPlot.PlotController customController = new OxyPlot.PlotController();
            customController.Bind(new OxyPlot.OxyMouseEnterGesture(), OxyPlot.PlotCommands.HoverSnapTrack);
            MainPlotView.Controller = customController;

            CategoryButton.FontWeight = FontWeights.Bold;
            LevelButton.FontWeight    = FontWeights.Regular;
            a_isCategoryPlot          = true;
            a_isInitialing            = false;
        }