Hello,
I am trying to set the height of all the charts on the page to half of the window size. However I keep getting the following error: Uncaught TypeError: undefined is not a function
The code I have is as follows:
The error pops up with the c.height($(window).height() * 0.5); statement.
Any idea what I am doing wrong? I am running the 2014.1.318 version
Thank you
I am trying to set the height of all the charts on the page to half of the window size. However I keep getting the following error: Uncaught TypeError: undefined is not a function
The code I have is as follows:
$(window).resize(function () { // for any chart or gauge widget $(".k-chart").each(function () { // get the instance of the chart/gauage var chart = kendo.widgetInstance($(this), kendo.ui); var c = $(this).data("kendoChart"); // make sure transitions are off //chart.options.transitions = false; console.log($(window).height() * 0.4); c.height($(window).height() * 0.4); // redraw the chart/gauge if (chart && chart.redraw) { chart.redraw(); } }); });The error pops up with the c.height($(window).height() * 0.5); statement.
Any idea what I am doing wrong? I am running the 2014.1.318 version
Thank you