Wednesday, 15 September 2010

Highcharts zooming on x-axis with specific labelling -



Highcharts zooming on x-axis with specific labelling -

i've been searching through highchart api , unable find way allow max zoom out (say) january, follow next tick 7 months later july , on. , @ same time have max zoom in 1 day only.

example:

***referring above picture, @ max zoom out (no zooming in) ==> x-axis label displaying jan/2005 @ first tick, sec tick july/2005, 3rd tick jan/2006, 4th tick july/2006... , on.

***referring above picture, user can @ same time zoom in 1 day max. (for this, i've done "mintickinterval: 24 * 3600 * 1000")

so able set minimum tick interval 1 day. however, not command interval when zoom out max. tried using "tickinterval" , starts giving me 365 ticks each year on x-axis @ max zoom out. tried "minrange: 210 * 24 * 3600 * 1000 // 210 # of days 7 months", still no luck no ticks downwards days after zooming in. max zoom out, datetime label auto scaled based on (i suppose) chart or screen size.

anyone got thought how or did not utilize api properly? i've been on week already. hope can help. thanks.

you can utilize tickpositioner define own function set ticks positions.

http://api.highcharts.com/highcharts#xaxis.tickpositioner

highcharts zooming

No comments:

Post a Comment