krispo / angular-nvd3

AngularJS directive for NVD3 reusable charting library (based on D3). Easily customize your charts via JSON API.
http://krispo.github.io/angular-nvd3
MIT License
1.29k stars 377 forks source link

Set default Focus Chart values #633

Open swapnilraut1 opened 7 years ago

swapnilraut1 commented 7 years ago

I am using Line with Focus Chart, in that i have to set default focus for graph. How can i achieve this???

kamilzaharan commented 7 years ago

@swapnilraut1 Did you manage to do that?

dgonzalezr commented 7 years ago

You can achieve it by adding brushExtent to your chart options:

options = {
    chart: {
        ....
        brushExtent: [min, max],
        ....
    }
}

where min an max represent two values from you xAxis values