Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 99250

Add title to chart on export

$
0
0

Currently, we have a chart situated within an ASP.NET MVC view without a title. When a user clicks an export button on the view, the chart is successfully created, however, business owners require the tile in the exported image. Is there any way to add a title to the chart prior to exporting it, or add one to the MVC chart and not display it in the view, just in the export?  I've tried the following without success:

$("#btnExport").on("click", function() {
    vartitleVal = $(this).data("name"); // this should be the exported chart title
    varchart = $("#myChart").getKendoChart();
     
    chart.options.title = titleVal;
    //chart.options.Title = titleVal;
    chart.exportImage().done(function(data) {
        kendo.saveAs({
            dataURI: data,
            fileName: "MyChart.png",
            proxyURL: '@Url.Action("Export_Save", "MyController")'
        });
    });
});

 

Any help or guidance would be greatly appreciated!


Viewing all articles
Browse latest Browse all 99250

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>