Khalid Zubair
Khalid Zubair

Reputation: 141

while converting kendo charts to pdf it draw lines on pdf charts

this is my jquery function in which i am getting kendo chart div element and appending it to a string after converting it to dataUrl , the probelm is that when i convert it to pdf the converted pdf picture has some sort of lines as shown in picture.

function Reportmodal() {
                  var depbar = $("#depbar").data("kendoChart");
                   var depbardataUrl = depbar.imageDataURL();                          
      // for appending chart
     string +="<img src= " + depbardataUrl + " height='300px' width='400px'></img>";
             source = string;
                    specialElementHandlers = {
                        '#bypassme': function (element, renderer) {
                            return true;
                        }
                    };
                    margins = {
                        top: 80,
                        bottom: 60,
                        left: 40,
                        width: 522
                    };
              doc.fromHTML(
                    source, // HTML string or DOM elem ref.
                    margins.left, // x coord
                    margins.top, { // y coord
                        'width': margins.width, // max width of content on PDF
                        'elementHandlers': specialElementHandlers
                    },
         function (dispose) {

                    doc.save('Report.pdf');
                }, margins);

        }

enter image description here

Upvotes: 2

Views: 239

Answers (1)

Razim Khan
Razim Khan

Reputation: 347

this is happened when you have already implement gradient in kendo charts , simply you need to remove gradient e.g

series: [{
           overlay: { gradient: "none" }
        }], 

Upvotes: 1

Related Questions