componentDidMount()

in stories/chart.lineBar.stories.js [233:322]


  componentDidMount() {
    setTimeout(() => {
      this.setState({
        data: [
          {
            name: '推送量',
            type: 'bar',
            data: [
              ['2019-01-19', 1319],
              ['2019-01-20', 1312],
              ['2019-01-21', 1285],
              ['2019-01-22', 1274],
              ['2019-01-23', 1244],
              ['2019-01-24', 1221],
              ['2019-01-25', 1196],
              ['2019-01-26', 1150],
              ['2019-01-27', 1126],
              ['2019-01-28', 1022],
              ['2019-01-29', 1005],
              ['2019-01-30', 1016],
              ['2019-01-31', 1003],
              ['2019-02-01', 988],
            ],
          },
          {
            name: '工单数',
            type: 'bar',
            data: [
              ['2019-01-19', 1411],
              ['2019-01-20', 1375],
              ['2019-01-21', 1362],
              ['2019-01-22', 1374],
              ['2019-01-23', 1388],
              ['2019-01-24', 1389],
              ['2019-01-25', 1420],
              ['2019-01-26', 1415],
              ['2019-01-27', 1417],
              ['2019-01-28', 1410],
              ['2019-01-29', 1415],
              ['2019-01-30', 1424],
              ['2019-01-31', 1410],
              ['2019-02-01', 1400],
            ],
          },
          {
            name: '准确率',
            type: 'line',
            yAxis: 1,
            data: [
              ['2019-01-19', 28.3548142532221],
              ['2019-01-20', 28.125],
              ['2019-01-21', 28.0155642023346],
              ['2019-01-22', 28.3359497645212],
              ['2019-01-23', 28.4565916398714],
              ['2019-01-24', 28.4193284193284],
              ['2019-01-25', 28.5117056856187],
              ['2019-01-26', 28.3478260869565],
              ['2019-01-27', 29.0408525754885],
              ['2019-01-28', 30.5283757338552],
              ['2019-01-29', 30.0497512437811],
              ['2019-01-30', 29.9212598425197],
              ['2019-01-31', 29.6111665004985],
              ['2019-02-01', 29.0485829959514],
            ],
          },
          {
            name: '召回率',
            type: 'line',
            yAxis: 1,
            data: [
              ['2019-01-19', 22.7498228206945],
              ['2019-01-20', 22.6909090909091],
              ['2019-01-21', 22.6138032305433],
              ['2019-01-22', 22.3435225618632],
              ['2019-01-23', 22.2622478386167],
              ['2019-01-24', 21.8142548596112],
              ['2019-01-25', 21.5492957746479],
              ['2019-01-26', 20.8480565371025],
              ['2019-01-27', 21.030345800988],
              ['2019-01-28', 21.063829787234],
              ['2019-01-29', 20.7773851590106],
              ['2019-01-30', 20.3651685393258],
              ['2019-01-31', 20.354609929078],
              ['2019-02-01', 19.7857142857143],
            ],
          },
        ],
      });
    }, 2000);
  }