whenever I am saving the chart using jqplotToImageStr() call the image saved is corrupted.
This code is responsible for getting the image string from the chart, putting in to the existing form and submitting the form:
<script type="text/javascript">
function downloadChart(){
var base64string = $( <?php echo '"#chart'.$chart_data['id'].'"'; ?>).jqplotToImageStr({});
$('#image').val(base64string);
$('#action').val('image');
$('#ChartAnalyticsForm').submit();
}
</script>
Then I can access the data passed through the form and save it on the server. However the saved image has the legend labels, month labels and data point labels corrupted (please take a look at example image below):
https://i.stack.imgur.com/vw45A.png
The bug was caused by wrong css.