【问题标题】:while converting kendo charts to pdf it draw lines on pdf charts在将剑道图表转换为 pdf 时,它会在 pdf 图表上绘制线条
【发布时间】:2017-04-13 10:15:39
【问题描述】:

这是我的 jquery 函数,我在其中获取 kendo 图表 div 元素并在将其转换为 dataUrl 后将其附加到字符串中,问题是当我将其转换为 pdf 时,转换后的 pdf 图片有某种线条,如图所示图片中。

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);

        }

【问题讨论】:

    标签: jquery kendo-ui jspdf kendo-chart pdf-conversion


    【解决方案1】:

    当您已经在剑道图表中实现渐变时会发生这种情况,只需删除渐变即可,例如

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-01-27
      • 2011-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多