or
Uncaught TypeError: Object #<SVGAnimatedString> has no method 'indexOf'if (element.className.indexOf(INVALIDMSG) > -1) {if (element.className.indexOf && element.className.indexOf(INVALIDMSG) > -1) {<!DOCTYPE html><html><head> <title>Kendo UI Chart with Input Validation Issue</title> <meta charset="UTF-8"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.common.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.default.min.css"></head><body> <div id="example" class="k-content"> <div class="chart-wrapper"> <div id="chart"></div> </div> <label for="name">Name: </label> <input type="text" id="name" required /> <span class="k-invalid-msg" data-for="name"></span> <button id="test">Test</button> </div> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.kendostatic.com/2013.2.716/js/kendo.web.min.js"></script> <script src="http://cdn.kendostatic.com/2013.2.716/js/kendo.dataviz.min.js"></script> <script> (function($){ function createChart() { $("#chart").kendoChart({ title: { text: "Site Visitors Stats /thousands/" }, legend: { visible: false }, seriesDefaults: { type: "bar" }, series: [{ name: "Total Visits", data: [56000, 63000, 74000, 91000, 117000, 138000] }, { name: "Unique visitors", data: [52000, 34000, 23000, 48000, 67000, 83000] }], valueAxis: { max: 140000, line: { visible: false }, minorGridLines: { visible: true } }, categoryAxis: { categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun"], majorGridLines: { visible: false } }, tooltip: { visible: true, template: "#= series.name #: #= value #" } }); } $(document).ready(function(){ var validator = $('#example').kendoValidator().data('kendoValidator'); createChart(); $(document).bind("kendo:skinChange", createChart); $('#test').on('click', function(e){ alert('validation: ' + validator.validate()); }); }); })(jQuery); </script> <style scoped> .chart-wrapper, .chart-wrapper .k-chart { height: 350px; } </style></body></html><script type="text/x-kendo-template" id="mytemplate"># for (int i ... ) #</script>kendo.bind(jQuery('#mytemplate'), cardsViewModel);var cards = new kendo.View('mytemplate', { wrap: false, model: cardsViewModel }); jQuery('#targetelement').html(cards.render());var inlineTemplate = kendo.template($("#javascriptTemplate").html());<div data-template="my-template" data-bind="source: myItems"> </div><script type="text/x-kendo-template" id="my-template"> <span data-bind="text: this"></span></script>function rceTime() { $("#chart9").kendoChart({ theme: $(document).data("kendoSkin") || "default", title: { text: "Visa Expiry and Contract Expiry in Coming months" }, dataSource: { transport: { read: { url: "scripts/contractExpiry.json", dataType: "json" } } }, legend: { visible: true, position: "right" }, seriesDefaults: { type: "scatterLine", }, series: [{ name: "Contract Expiry", xField: "month", yField: "day" },{ name: "Visa Expiry", xField: "month1", yField: "day1" }], xAxis: { title: { text: "Month" }, max: 12, }, yAxis: { title: { text: "Date of Month" }, min: 0, max: 31, labels: { format: "{0}" } }, tooltip: { visible: true, template: "#= dataItem.name #" } });}public class Event{ public DateTime eventDate {get; set;} public string name {get; set;} public double eventvalue {get; set;}}<div class="chart-wrapper"> @(Html.Kendo().Chart(Model) .Name("chart") .Title("events") .Legend(legend => legend .Position(ChartLegendPosition.Bottom) ) .Series(series => { series.Line(model => model.eventvalue ) .Name(item.name ); //.Labels(labels => labels.Format("{0:N0}").Visible(true)); }) .CategoryAxis(axis => axis .Categories(model => model.eventDate ) ) .ValueAxis(axis => axis.Numeric() .Labels(labels => labels.Format("{0:N0}")) ) ) </div><div class="chart-wrapper"> @(Html.Kendo().Chart(Model) .Name("chart") .Title("Product Samplings") .Legend(legend => legend .Position(ChartLegendPosition.Bottom) ) .Series(series => { foreach (var item in Model) { series.Line(model => model.eventvalue ) .Name(item.name ); //.Labels(labels => labels.Format("{0:N0}").Visible(true)); } }) .CategoryAxis(axis => axis .Categories(model => model.eventDate ) ) .ValueAxis(axis => axis.Numeric() .Labels(labels => labels.Format("{0:N0}")) ) ) </div>