title: How to consume a java rest to render nv3d candlestick chart with Angular?
body: <p>I'm trying to use nvd3d candlestick chart with Angular, but I'm not getting to render it when using a rest service built in Java.</p>
  
  <p>How to consume a java rest to render nv3d candlestick chart with Angular?</p>
  
  <p>My rest is returning this:</p>
  
  <p><code>[{"id":450,"vwap":3821.62,"faixa":69.48,"open":3858.7,"high":3863.29,"low":3793.81,"close":3795.54,"date":19338}]</code></p>
  
  <p>The component expected this:</p>
  
  <p><code>[{values:[{"id":450,"vwap":3821.62,"faixa":69.48,"open":3858.7,"high":3863.29,"low":3793.81,"close":3795.54,"date":19338}]}]</code></p>
  
  <p>My Angular code:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Provider, SkipSelf, Optional, InjectionToken } from '@angular/core';
  import { Response, Http } from '@angular/http';
  import { Observable } from 'rxjs/Observable';
  import 'rxjs/add/operator/map';
  
  import { HttpInterceptorService, RESTService } from '@covalent/http';
  
  import 'rxjs/add/operator/map';
  import 'rxjs/add/operator/catch';
  import 'rxjs/add/operator/do';
  
  
  export interface IDolFutDiario {
  id: number;
    date: number;
    open: number;
    high: number;
    low: number;
    close: number;
    vwap: number;
    faixa: number;
  }
  
  @Injectable()
  export class DolfudiarioService extends RESTService&lt;IDolFutDiario&gt;{
  
    constructor(private _http: HttpInterceptorService) {
      super(_http, {
        baseUrl: 'http://localhost:8080', 
        path: '',
      });
    }
  
    staticQuery(): Observable&lt;IDolFutDiario[]&gt; {
  
      return this.http.get('http://localhost:8080/dolfutdiarios')
          .map(this.extractData)
          .catch(this.handleErrorObservable);
    }
  
    extractData(res: Response) {
      let body = res.json();
      return body;
   }  
  
   private handleErrorObservable (error: Response | any) {
      console.error(error.message || error);
      return Observable.throw(error.message || error);
      }
  }
  </code></pre>
  
  <p>My Java code:</p>
  
  <pre><code>@RestController
  public class DolFutRestController {
  
      @Autowired
      DolFutDiarioService dolFutDiarioService;
  
      @RequestMapping(value = "dolfutdiarios", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
      public ResponseEntity&lt;List&lt;DolFutDiario&gt;&gt; list() {
          List&lt;DolFutDiario&gt; dolfutdiarios = dolFutDiarioService.listDolFutDiarios();
          return ResponseEntity.ok().body(dolfutdiarios);
      }   
  }
  </code></pre>
  
  <p>PS: When I put the second block of data  <code>[[values: .....</code> , it works.
  However when I get from Java Service it does not. 
  No errors returned as well.</p>