private function buildBurnDownChart()
 {
     $project_phid = $this->request->getStr('project');
     $data = $this->getXactionData($project_phid);
     $id = 'burnup chart';
     $data = $this->buildSeries($data);
     $stats = new SprintStats();
     $data = $stats->transposeArray($data);
     require_celerity_resource('d3', 'sprint');
     require_celerity_resource('c3-css', 'sprint');
     require_celerity_resource('c3', 'sprint');
     Javelin::initBehavior('burndown-report-chart', array('hardpoint' => $id, 'x' => $data[0], 'y' => $data[1]), 'sprint');
     $chart = id(new PHUIObjectBoxView())->setHeaderText(pht('Burn Up Report'))->appendChild(phutil_tag('div', array('id' => $id, 'style' => 'border: 1px solid #BFCFDA; ' . 'background-color: #fff; ' . 'margin: 8px 16px; ' . 'height: 400px; '), ''));
     return $chart;
 }
 public function testbuildDataSet()
 {
     $stats = new SprintStats();
     $viewer = $this->generateNewTestUser();
     $timezone = $stats->setTimezone($viewer);
     $date = new DateTime();
     $now = $date->format('U');
     $end = $now + $this->week_interval * 2;
     $timeseries = $stats->buildDateArray($now, $end, $timezone);
     $series = array('Start Points', 'Remaining Points', 'Ideal Points', 'Points Closed Today');
     $data = $stats->buildDataSet($timeseries);
     $this->assertEquals($series, $data[0]);
 }