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

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -