Zooming may ignore x-axis labels

TeeChart for Javascript for the HTML5 Canvas
Post Reply
Jared Cooper
Posts: 2
Joined: Mon Dec 02, 2013 12:00 am

Zooming may ignore x-axis labels

Post by Jared Cooper » Thu May 08, 2014 12:38 pm

I have a very simple JS chart, including:


When zooming with the mouse, once you zoom in far enough (not far in this simple example) the x-axis starts showing 1.2, 3.4, etc - it's ignoring the labels and showing a partial value between the x values.

This is also true if the Series0.data.x... line is removed, so only values and labels are included.

Is there any way to prevent this?

Site Admin
Site Admin
Posts: 8923
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: Zooming may ignore x-axis labels

Post by Yeray » Fri May 09, 2014 10:42 am


You could play with the zoom events and the increment. Ie:

Code: Select all

  Chart1.onzoom=function() {
    Chart1.axes.bottom.increment=(Chart1.axes.bottom.increm<=1)? 1:0;
  Chart1.zoom.onreset=function() {	
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply