     } else {
       self.barChart.data = nil
     }
+
+    self.barChart.notifyDataSetChanged()
   }
 
 }


        dataSet.notifyDataSetChanged()
        data.notifyDataChanged()
        self.barChart.notifyDataSetChanged()
      } else {
        let dataSet = BarChartDataSet(values: entries, label: "kWh")
        dataSet.setColor(EmonCMSColors.Chart.Blue)

    } else {
      self.lineChart.data = nil
    }

    self.lineChart.notifyDataSetChanged()
  }

  fileprivate func updateBarChartData(_ dataPoints: [DataPoint]?) {
