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
() {
var
titleVal = $(
this
).data(
"name"
); // this should be the exported chart title
var
chart = $(
"#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!