javascript - Chartsjs zoom start at zoomed in -


i have built line chart using chartsjs, , zoom plugin. works pans , zooms nicely, however, chart loads complete range of data, want start "zoomed in" n amount. have tried adjust settings, no avail. pointers @ stage appreciated.

finally worked out.

in scales options section need add min integer when used zoom function still renders graph outside of canvas, ready panning.

scales: {          xaxes:[                  {                     type: 'time',                     time: {                     min: '2',                     tooltipformat: 'll',                     displayformats: {                     quarter: 'mmm yyyy',                 }             }, 

as long "type" time worked me.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -