def show_scatter(self, line):
     # Draw Line Scatter
     try:
         if len(self._shw.get_gender()) == 0 or len(
                 self._shw.get_salary()) == 0:
             raise ValueError("No data to display.")
         # Draw gender
         if line.upper() == Data.GENDER.name:
             View.plot_bar(self._shw.get_gender(), "Gender Distribution")
         # Draw BMI
         if line.upper() == Data.SALARY.name:
             View.plot_bar(self._shw.get_salary(), "Salary Index (SALARY)")
     except ValueError as e:
         View.info(e)
     except Exception as e:
         View.error(e)
 def show_bar(self, line):
     # Draw Bars
     try:
         if len(self._shw.get_gender()) == 0 or len(
                 self._shw.get_gender()) == 0:
             raise ValueError("No data to display.")
         # Draw gender
         if line.upper() == Data.GENDER.name:
             View.plot_bar(self._shw.get_gender(), "Gender Distribution")
         # Draw BMI
         if line.upper() == Data.BMI.name:
             View.plot_bar(self._shw.get_bmi(), "Body Mass Index (BMI)")
     except ValueError as e:
         View.info(e)
     except Exception as e:
         View.error(e)