Question

I am having some trouble getting the graph created with jqplot to print with proper alignment in IE 7 & 8. It looks great on the screen, but once I click print preview it get's all messed up.

Help me please

Alignment in IE 9, Firefox and Chrome is perfect. Any help would be greatly appreciated

https://lh6.googleusercontent.com/_eXAGzNHBomg/TbgxHZiwFRI/AAAAAAAACwg/CQqXHN2CkZA/s800/d01.png

Was it helpful?

Solution 2

Added a class iterator to the canvases and then use browser hacks to perfectly alignment the bars for different browsers.

This is the modified excanvas : http://pastebin.com/mgHUbe3S

Line 309 is where the magic happens

    var el = surfaceElement.ownerDocument.createElement('div');
    **el.className = "seriesContainer_"+counter;**
    el.style.width =  surfaceElement.clientWidth + 'px';
    el.style.height = surfaceElement.clientHeight + 'px';
    el.style.overflow = 'hidden';
    el.style.position = 'absolute';
    surfaceElement.appendChild(el);

    this.element_ = el;
    this.arcScaleX_ = 1;
    this.arcScaleY_ = 1;
    this.lineScale_ = 1;
    counter++;
  }

OTHER TIPS

This worked for me. It's a javascript function that resets the absolute position of each canvas.

Go through your printing settings and make sure it is CSS enabled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top