| Wijmo Team Member | waqar posted on July 3, 2012 at 7:08 am I am using different wijmo chart , i want to zoom in and zoom out the chart area how can i do it.. | |
| Wijmo Team Member | abdiasm posted on July 3, 2012 at 1:30 pm wijmo chart does not have inbuilt support for zoom in and zoom out as yet. You can use the following workaround to zoom in and zoom out with the help of two buttons. You’ll have to wrap a container div around the wijmo chart. $(document).ready(function() {
var currZoom = $(“#wijbarchart”).css(“zoom”);
if (currZoom == ‘normal’) currZoom = 1;
$(“#btnZoomIn”).click(function () {
currZoom *= 1.2;
$(“#wijbarchart”).css(“zoom”, currZoom);
$(“#wijbarchart”).css(“-moz-transform”, “Scale(” + currZoom + “)”);
$(“#wijbarchart”).css(“-moz-transform-origin”, “0 0″);
});
$(“#btnZoomOut”).click(function () {
//prevent user from zooming out too much
if (currZoom > 0.4) {
currZoom *= 0.8;
$(“#wijbarchart”).css(“zoom”, currZoom);
$(“#wijbarchart”).css(“-moz-transform”, “Scale(” + currZoom + “)”);
$(“#wijbarchart”).css(“-moz-transform-origin”, “0 0″);
}
});
});Have a look at the attached sample. Regards Attachments: | Answer |
| Wijmo Team Member | Answer | |
| Wijmo Team Member | Richa posted on November 6, 2012 at 6:54 am Hello vjpgo, Zooming in chart can only be done through the code given above. Let me know if this doesnt work for you. Thanks, | Answer |
Tagged: Zoom
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.