def test_x_axis_labels(self):
    test_inputs = {
      0: {},
      7: {},
      10: {5: '25s'},
      15: {5: '25s', 10: '50'},
      20: {5: '25s', 10: '50', 15: '1m'},
      25: {5: '25s', 10: '50', 15: '1m', 20: '1.6'},
      45: {5: '25s', 10: '50', 15: '1m', 20: '1.6', 25: '2.0', 30: '2.5', 35: '2.9', 40: '3.3'},
      80: {10: '50s', 20: '1m', 30: '2.5', 40: '3.3', 50: '4.1', 60: '5.0', 70: '5.8'},  # spaced more since wide
    }

    for width, expected in test_inputs.items():
      self.assertEqual(expected, nyx.panel.graph._x_axis_labels(nyx.panel.graph.Interval.FIVE_SECONDS, width))

    test_inputs = {
      nyx.panel.graph.Interval.EACH_SECOND: {
        10: '10s', 20: '20', 30: '30', 40: '40', 50: '50', 60: '1m', 70: '1.1'
      }, nyx.panel.graph.Interval.FIVE_SECONDS: {
        10: '50s', 20: '1m', 30: '2.5', 40: '3.3', 50: '4.1', 60: '5.0', 70: '5.8'
      }, nyx.panel.graph.Interval.THIRTY_SECONDS: {
        10: '5m', 20: '10', 30: '15', 40: '20', 50: '25', 60: '30', 70: '35'
      }, nyx.panel.graph.Interval.MINUTELY: {
        10: '10m', 20: '20', 30: '30', 40: '40', 50: '50', 60: '1h', 70: '1.1'
      }, nyx.panel.graph.Interval.FIFTEEN_MINUTE: {
        10: '2h', 20: '5', 30: '7', 40: '10', 50: '12', 60: '15', 70: '17'
      }, nyx.panel.graph.Interval.THIRTY_MINUTE: {
        10: '5h', 20: '10', 30: '15', 40: '20', 50: '1d', 60: '1.2', 70: '1.4'
      }, nyx.panel.graph.Interval.HOURLY: {
        10: '10h', 20: '20', 30: '1d', 40: '1.6', 50: '2.0', 60: '2.5', 70: '2.9'
      }, nyx.panel.graph.Interval.DAILY: {
        10: '10d', 20: '20', 30: '30', 40: '40', 50: '50', 60: '60', 70: '70'
      },
    }

    for interval, expected in test_inputs.items():
      self.assertEqual(expected, nyx.panel.graph._x_axis_labels(interval, 80))