Hello,
I am trying to use exporting kendo chart as a TypeScript class to expose export methods across my application but both getKendoChart() and exportImage() (as does exportPDF and exportSVG) don't seem to be exposed.
Below is the JS I am trying to use
And below is the TypeScript file I am trying to create
Am I missing anything?
Thanks
Venkata
I am trying to use exporting kendo chart as a TypeScript class to expose export methods across my application but both getKendoChart() and exportImage() (as does exportPDF and exportSVG) don't seem to be exposed.
Below is the JS I am trying to use
var chart = $("#chart").getKendoChart();
chart.exportImage().done(function(data) {
kendo.saveAs({
dataURI: data,
fileName: "chart.png",
proxyURL: "http://demos.telerik.com/kendo-ui/service/export"
});
});
And below is the TypeScript file I am trying to create
/// <
reference
path
=
"../../scripts/typings/jquery/jquery.d.ts"
/>
/// <
reference
path
=
"../../scripts/typings/kendo/kendo.all.d.ts"
/>
class KendoChartExporter {
exportAsPng(id: string) {
var chart = $("#chart").getKendoChart();
chart.exportImage().done(function(data) {
kendo.saveAs({
dataURI: data,
fileName: "chart.png",
proxyURL: "http://demos.telerik.com/kendo-ui/service/export"
});
});
}
}
Am I missing anything?
Thanks
Venkata