prepareDataUsageGraphData() {
    const offerLimit = this.account.data.offer
      .esStorage * this.LogsConstants.OFFER_STORAGE_MULTIPLIER;
    const maxDataReceived = _.max(this.storageData.data.usageData[0]);
    this.dataUsageGraphData.labels = this.storageData.data.timestamps.map(timestamp => moment(timestamp).format('DD MMM'));
    this.dataUsageGraphData.data = this.storageData.data.usageData;
    this.dataUsageGraphData.series = [this.$translate.instant('logs_home_data_received'), this.$translate.instant('logs_home_number_of_documents')];
    if (offerLimit <= maxDataReceived * 1.5) {
      this.dataUsageGraphData.data.push(this.storageData.data.timestamps.map(() => offerLimit));
      this.dataUsageGraphData.series.push(this.$translate.instant('logs_home_offer_limit'));
    }
    this.dataUsageGraphData.options.scales.yAxes[0].ticks = {
      suggestedMin: 0,
      suggestedMax: maxDataReceived * 1.3 || 5,
      callback: value => (value % 1 === 0 ? this.bytesFilter(value, 2, true) : ''),
    };
    this.dataUsageGraphData.options.scales.yAxes[1].ticks = {
      suggestedMin: 0,
      suggestedMax: _.max(this.dataUsageGraphData.data[1]) * 1.3 || 5,
      callback: value => (value % 1 === 0 ? value : ''),
    };

    this.dataUsageGraphData.options.tooltips.callbacks = {
      label: (tooltipItem, data) => {
        if (tooltipItem.datasetIndex > 1) {
          return '';
        }
        let label = data.datasets[tooltipItem.datasetIndex].label || '';
        if (label) {
          label += ': ';
        }
        label += tooltipItem.datasetIndex === 0
          ? this.bytesFilter(tooltipItem.yLabel, 2, true)
          : this.LogsHomeService.constructor.humanizeNumber(tooltipItem.yLabel);
        return label;
      },
    };
  }
/**
   * Prepares the data usage graph
   *
   * @memberof LogsHomeCtrl
   */
Prepares the data usage graph
@memberof LogsHomeCtrl
Prepares the data usage graph @memberof LogsHomeCtrl
prepareDataUsageGraphData() {
    const offerLimit = this.account.data.offer
      .esStorage * this.LogsConstants.OFFER_STORAGE_MULTIPLIER;
    const maxDataReceived = _.max(this.storageData.data.usageData[0]);
    this.dataUsageGraphData.labels = this.storageData.data.timestamps.map(timestamp => moment(timestamp).format('DD MMM'));
    this.dataUsageGraphData.data = this.storageData.data.usageData;
    this.dataUsageGraphData.series = [this.$translate.instant('logs_home_data_received'), this.$translate.instant('logs_home_number_of_documents')];
    if (offerLimit <= maxDataReceived * 1.5) {
      this.dataUsageGraphData.data.push(this.storageData.data.timestamps.map(() => offerLimit));
      this.dataUsageGraphData.series.push(this.$translate.instant('logs_home_offer_limit'));
    }
    this.dataUsageGraphData.options.scales.yAxes[0].ticks = {
      suggestedMin: 0,
      suggestedMax: maxDataReceived * 1.3 || 5,
      callback: value => (value % 1 === 0 ? this.bytesFilter(value, 2, true) : ''),
    };
    this.dataUsageGraphData.options.scales.yAxes[1].ticks = {
      suggestedMin: 0,
      suggestedMax: _.max(this.dataUsageGraphData.data[1]) * 1.3 || 5,
      callback: value => (value % 1 === 0 ? value : ''),
    };
    this.dataUsageGraphData.options.tooltips.callbacks = {
      label: (tooltipItem, data) => {
        if (tooltipItem.datasetIndex > 1) {
          return '';
        }
        let label = data.datasets[tooltipItem.datasetIndex].label || '';
        if (label) {
          label += ': ';
        }
        label += tooltipItem.datasetIndex === 0
          ? this.bytesFilter(tooltipItem.yLabel, 2, true)
          : this.LogsHomeService.constructor.humanizeNumber(tooltipItem.yLabel);
        return label;
      },
    };
  }
prepareDataUsageGraphData ( ) { const offerLimit = this . account . data . offer . esStorage * this . LogsConstants . OFFER_STORAGE_MULTIPLIER ; const maxDataReceived = _ . max ( this . storageData . data . usageData [ 0 ] ) ; this . dataUsageGraphData . labels = this . storageData . data . timestamps . map ( timestamp => moment ( timestamp ) . format ( 'DD MMM' ) ) ; this . dataUsageGraphData . data = this . storageData . data . usageData ; this . dataUsageGraphData . series = [ this . $translate . instant ( 'logs_home_data_received' ) , this . $translate . instant ( 'logs_home_number_of_documents' ) ] ; if ( offerLimit <= maxDataReceived * 1.5 ) { this . dataUsageGraphData . data . push ( this . storageData . data . timestamps . map ( ( ) => offerLimit ) ) ; this . dataUsageGraphData . series . push ( this . $translate . instant ( 'logs_home_offer_limit' ) ) ; } this . dataUsageGraphData . options . scales . yAxes [ 0 ] . ticks = { suggestedMin : 0 , suggestedMax : maxDataReceived * 1.3 || 5 , callback : value => ( value % 1 === 0 ? this . bytesFilter ( value , 2 , true ) : '' ) , } ; this . dataUsageGraphData . options . scales . yAxes [ 1 ] . ticks = { suggestedMin : 0 , suggestedMax : _ . max ( this . dataUsageGraphData . data [ 1 ] ) * 1.3 || 5 , callback : value => ( value % 1 === 0 ? value : '' ) , } ; this . dataUsageGraphData . options . tooltips . callbacks = { label : ( tooltipItem , data ) => { if ( tooltipItem . datasetIndex > 1 ) { return '' ; } let label = data . datasets [ tooltipItem . datasetIndex ] . label || '' ; if ( label ) { label += ': ' ; } label += tooltipItem . datasetIndex === 0 ? this . bytesFilter ( tooltipItem . yLabel , 2 , true ) : this . LogsHomeService . constructor . humanizeNumber ( tooltipItem . yLabel ) ; return label ; } , } ; }
Prepares the data usage graph
 @memberof LogsHomeCtrl
Prepares the data usage graph @memberof LogsHomeCtrl