JSFiddle - React, Tailwind, and code Playground

by Ignacio Fuentes

HTML

<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.918/styles/kendo.common.min.css">
<script src="http://cdn.kendostatic.com/2013.2.918/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.918/styles/kendo.silver.min.css">
<script src="http://demos.kendoui.com/content/shared/js/people.js"></script>
<div id="grid"></div>
<br />
<div id="chart"></div>

JavaScript

var ds = new kendo.data.DataSource({
    schema: {
        model: {
            id: "id",
            fields: {
                time: {},
                distance: {
                    type: "number" //this is the type
                }
            }
        }
    },
    data: [{
        id: "1",
        time: 0,
        distance: 0
    }, {
        id: "2",
        time: 1,
        distance: 1
    }, {
        id: "3",
        time: 2,
        distance: 4
    }, {
        id: "4",
        time: 3,
        distance: 9
    }, {
        id: "5",
        time: 4,
        distance: 16
    }, {
        id: "6",
        time: 5,
        distance: 25
    }, {
        id: "7",
        time: 6,
        distance: 36
    }, ]
});


$("#grid").kendoGrid({
           columns: ["time", "distance"],
    dataSource: ds,
    editable:"popup",
    selectable: true,
    rowTemplate: "<tr data-comp='#: time.toString()+distance.toString() #'><td>#: time #</td><td>#: distance #</td></tr>"
});
var g = $("#grid").data("kendoGrid");



$("#chart").kendoChart({
    dataSource: ds,
    chartArea: {
        background: ""
    },
    seriesDefaults: {
        type: "line"
    },
    series: [{
        field: "distance",
        name: "Distance",
        categoryField: "time",

    }],
    seriesClick: function (e) {
        var comp =e.category.toString()+e.value.toString();        
        g.select("tr[data-comp="+comp+"]");
        g.editCell(g.select());
    }
});