Skip to content

Instantly share code, notes, and snippets.

Created October 30, 2015 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/334712463cad6a2029bb to your computer and use it in GitHub Desktop.
Save anonymous/334712463cad6a2029bb to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/donojenaci
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.rtl.min.css">
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.dataviz.min.css">
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.dataviz.default.min.css">
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.mobile.all.min.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.930/js/kendo.all.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.930/js/angular.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2015.3.930/js/jszip.min.js"></script>
</head>
<body>
<script id="tooltip-template" type="text/x-kendo-template">
<table>
<tr>
<td colspan="2">
#: category #
</td>
</tr>
# for (var i = 0; i < points.length; i++) { #
<tr>
<td>
#: points[i].series.name# :
</td>
<td>
#: points[i].value.toFixed(2) #
</td>
</tr>
# } #
</table>
</script>
<div id="chart" />
<script>
$("#chart").kendoChart({
panes: [
{ name: 'pane0' },
{ name: 'pane1' },
{ name: 'pane2' }
],
categoryAxis: [
{
field: 'time',
baseUnit: 'minutes',
pane: 'pane0',
type: 'date',
min:'2015-01-01',
max:'2016-01-01',
labels: { visible: false }
}, {
field: 'time',
baseUnit: 'minutes',
pane: 'pane1',
type: 'date',
min:'2015-01-01',
max:'2016-01-01',
labels: { visible: false }
},
{
field: 'time',
baseUnit: 'minutes',
pane: 'pane2',
type: 'date',
min:'2015-01-01',
max:'2016-01-01'
}
],
valueAxis: [
{ pane: 'pane0', name: 'axe0' },
{ pane: 'pane1', name: 'axe1' },
{ pane: 'pane2', name: 'axe2' }
],
series: [
{ field: 'flowRate', name: 'Flow Rate', axis: 'axe0' },
{ field: 'scRatio', name: 'Sc Ratio', axis: 'axe0' },
{ field: 'swl', name: 'Swl', axis: 'axe1' },
{ field: 'pwl', name: 'Pwl', axis: 'axe1' },
{ field: 'tdh', name: 'Tdh', axis: 'axe1' },
{ field: 'pressure', name: 'Pressure', axis: 'axe2' }
],
seriesDefaults: {
type: "line",
line: { width: 2 },
markers: { visible: false },
},
legend: { position: "top" },
tooltip: {
visible: true,
shared: true,
sharedTemplate: kendo.template($("#tooltip-template").html())
},
dataSource: {
data: [
{"time":"2015-05-02T03:14:24.000Z","flowRate":92.6,"scRatio":null,"swl":null,"pwl":58.59,"tdh":54.32999999999999,"pressure":4.6},
{"time":"2015-05-02T03:15:00.000Z","flowRate":0,"scRatio":null,"swl":null,"pwl":51.52,"tdh":46.099999999999994,"pressure":3.1},
{"time":"2015-05-02T07:50:00.000Z","flowRate":57.2,"scRatio":72.40506329113867,"swl":50.73,"pwl":null,"tdh":66.5,"pressure":5.1},
{"time":"2015-05-03T02:59:10.000Z","flowRate":74.4,"scRatio":94.17721518987268,"swl":null,"pwl":58.42,"tdh":54.49999999999999,"pressure":4.6},
{"time":"2015-05-03T03:00:00.000Z","flowRate":0,"scRatio":0,"swl":null,"pwl":51.07,"tdh":45.53,"pressure":3},
{"time":"2015-05-03T04:05:16.000Z","flowRate":95.2,"scRatio":279.9999999999972,"swl":51.74,"pwl":null,"tdh":62.86999999999999,"pressure":4.699999999999999},
{"time":"2015-05-03T04:10:00.000Z","flowRate":94.6,"scRatio":279.9999999999972,"swl":54.54,"pwl":null,"tdh":62.86999999999999,"pressure":4.699999999999999},
{"time":"2015-05-03T06:51:04.000Z","flowRate":77.2,"scRatio":29.692307692307676,"swl":48.47,"pwl":null,"tdh":44.51,"pressure":2.9},
{"time":"2015-05-03T06:55:00.000Z","flowRate":95.4,"scRatio":29.692307692307676,"swl":53.86,"pwl":null,"tdh":62.86999999999999,"pressure":4.699999999999999},
{"time":"2015-05-04T04:03:15.000Z","flowRate":74.2,"scRatio":29.692307692307676,"swl":null,"pwl":58.44,"tdh":54.48,"pressure":4.6},
{"time":"2015-05-04T04:05:00.000Z","flowRate":0,"scRatio":29.692307692307676,"swl":null,"pwl":50.9,"tdh":45.7,"pressure":3},
{"time":"2015-05-05T03:43:05.000Z","flowRate":55.2,"scRatio":29.692307692307676,"swl":null,"pwl":58.56,"tdh":57.41999999999999,"pressure":4.8999999999999995},
{"time":"2015-05-05T03:45:00.000Z","flowRate":0,"scRatio":29.692307692307676,"swl":null,"pwl":50.83,"tdh":46.79,"pressure":3.1},
{"time":"2015-05-05T07:06:46.000Z","flowRate":57.8,"scRatio":26.7592592592593,"swl":48.67,"pwl":null,"tdh":45.769999999999996,"pressure":3},
{"time":"2015-05-05T07:10:00.000Z","flowRate":95.6,"scRatio":26.7592592592593,"swl":53.99,"pwl":null,"tdh":63.10999999999999,"pressure":4.699999999999999},
{"time":"2015-05-06T02:58:47.000Z","flowRate":74.2,"scRatio":26.7592592592593,"swl":null,"pwl":58.53,"tdh":54.38999999999999,"pressure":4.6},
{"time":"2015-05-06T03:00:00.000Z","flowRate":0,"scRatio":26.7592592592593,"swl":null,"pwl":51.15,"tdh":45.45,"pressure":3},
{"time":"2015-05-06T04:05:28.000Z","flowRate":77,"scRatio":48.427672955974955,"swl":49.56,"pwl":null,"tdh":72.99000000000001,"pressure":5.7},
{"time":"2015-05-06T04:10:00.000Z","flowRate":94.8,"scRatio":48.427672955974955,"swl":54.63,"pwl":null,"tdh":62.78999999999999,"pressure":4.699999999999999},
{"time":"2015-05-06T09:02:30.000Z","flowRate":58.4,"scRatio":24.333333333333346,"swl":48.75,"pwl":null,"tdh":45.45,"pressure":3},
{"time":"2015-05-06T09:05:00.000Z","flowRate":95.6,"scRatio":24.333333333333346,"swl":54.05,"pwl":null,"tdh":61.769999999999996,"pressure":4.6},
{"time":"2015-05-07T03:14:54.000Z","flowRate":93.2,"scRatio":24.333333333333346,"swl":null,"pwl":58.56,"tdh":54.35999999999999,"pressure":4.6},
{"time":"2015-05-07T03:15:00.000Z","flowRate":0,"scRatio":24.333333333333346,"swl":null,"pwl":51.57,"tdh":45.03,"pressure":3},
{"time":"2015-05-07T07:54:57.000Z","flowRate":0,"scRatio":24.333333333333346,"swl":48.56,"pwl":null,"tdh":45.03,"pressure":3},
{"time":"2015-05-07T07:55:00.000Z","flowRate":76.4,"scRatio":24.333333333333346,"swl":52.98,"pwl":null,"tdh":62.36999999999999,"pressure":4.699999999999999},
{"time":"2015-05-07T12:17:42.000Z","flowRate":56,"scRatio":10.937499999999991,"swl":null,"pwl":58.1,"tdh":55.83999999999999,"pressure":4.699999999999999},
{"time":"2015-05-07T12:20:00.000Z","flowRate":0,"scRatio":10.937499999999991,"swl":null,"pwl":50.49,"tdh":46.11,"pressure":3},
{"time":"2015-05-08T03:07:13.000Z","flowRate":56.2,"scRatio":10.330882352941169,"swl":null,"pwl":58.42,"tdh":54.49999999999999,"pressure":4.6},
{"time":"2015-05-08T03:10:00.000Z","flowRate":95.6,"scRatio":39.18918918918909,"swl":53.82,"pwl":null,"tdh":63.40999999999999,"pressure":4.699999999999999},
{"time":"2015-07-10T05:23:56.000Z","flowRate":93,"scRatio":39.18918918918909,"swl":null,"pwl":58.41,"tdh":54.51,"pressure":4.6},
{"time":"2015-07-10T05:25:00.000Z","flowRate":55.8,"scRatio":39.18918918918909,"swl":null,"pwl":50.66,"tdh":45.94,"pressure":3},
{"time":"2015-07-10T07:51:21.000Z","flowRate":58,"scRatio":25.438596491228136,"swl":48.38,"pwl":null,"tdh":45.94,"pressure":3},
{"time":"2015-07-10T07:55:00.000Z","flowRate":96,"scRatio":25.438596491228136,"swl":54.11,"pwl":null,"tdh":62.26,"pressure":4.6},
{"time":"2015-07-12T05:45:44.000Z","flowRate":56.4,"scRatio":12.876712328767116,"swl":null,"pwl":58.49,"tdh":54.42999999999999,"pressure":4.6},
{"time":"2015-07-12T05:50:00.000Z","flowRate":0,"scRatio":12.876712328767116,"swl":null,"pwl":49.98,"tdh":45.6,"pressure":2.9},
{"time":"2015-07-12T07:11:48.000Z","flowRate":0,"scRatio":0,"swl":48.51,"pwl":null,"tdh":45.6,"pressure":2.9},
{"time":"2015-07-12T07:15:00.000Z","flowRate":96.2,"scRatio":0,"swl":54.4,"pwl":null,"tdh":62.94,"pressure":4.6},
{"time":"2015-07-19T04:35:51.000Z","flowRate":93,"scRatio":34.831460674157285,"swl":null,"pwl":57.07,"tdh":44.629999999999995,"pressure":3.4999999999999996},
{"time":"2015-07-19T04:40:00.000Z","flowRate":18.6,"scRatio":34.831460674157285,"swl":null,"pwl":50.06,"tdh":46.53999999999999,"pressure":3},
{"time":"2015-07-19T08:01:30.000Z","flowRate":57.6,"scRatio":32.91428571428572,"swl":48.31,"pwl":null,"tdh":46.53999999999999,"pressure":3},
{"time":"2015-07-19T08:05:00.000Z","flowRate":95.8,"scRatio":32.91428571428572,"swl":54.09,"pwl":null,"tdh":63.87999999999999,"pressure":4.699999999999999},
{"time":"2015-07-25T05:06:24.000Z","flowRate":92.8,"scRatio":17.74378585086043,"swl":null,"pwl":59.32,"tdh":54.61999999999999,"pressure":4.699999999999999},
{"time":"2015-07-25T05:10:00.000Z","flowRate":0,"scRatio":17.74378585086043,"swl":null,"pwl":50.41,"tdh":46.19,"pressure":3},
{"time":"2015-07-25T09:01:18.000Z","flowRate":57.4,"scRatio":29.74093264248705,"swl":48.48,"pwl":null,"tdh":46.19,"pressure":3},
{"time":"2015-07-25T09:05:00.000Z","flowRate":95,"scRatio":29.74093264248705,"swl":54.46,"pwl":null,"tdh":62.51,"pressure":4.6},
{"time":"2015-07-26T05:03:47.000Z","flowRate":93,"scRatio":29.74093264248705,"swl":null,"pwl":58.84,"tdh":54.07999999999999,"pressure":4.6},
{"time":"2015-07-26T05:05:00.000Z","flowRate":18.6,"scRatio":29.74093264248705,"swl":null,"pwl":50.81,"tdh":45.78999999999999,"pressure":3},
{"time":"2015-07-27T05:14:48.000Z","flowRate":92.2,"scRatio":29.74093264248705,"swl":null,"pwl":58.5,"tdh":54.419999999999995,"pressure":4.6},
{"time":"2015-07-27T05:15:00.000Z","flowRate":18.4,"scRatio":29.74093264248705,"swl":null,"pwl":51.61,"tdh":44.989999999999995,"pressure":3},
{"time":"2015-07-27T07:51:05.000Z","flowRate":77.6,"scRatio":24.792332268370586,"swl":48.48,"pwl":null,"tdh":43.97,"pressure":2.9},
{"time":"2015-07-27T07:55:00.000Z","flowRate":96.2,"scRatio":24.792332268370586,"swl":54.46,"pwl":null,"tdh":61.309999999999995,"pressure":4.6},
{"time":"2015-07-29T03:13:40.000Z","flowRate":93,"scRatio":24.792332268370586,"swl":null,"pwl":58.39,"tdh":54.529999999999994,"pressure":4.6},
{"time":"2015-07-29T03:15:00.000Z","flowRate":18.6,"scRatio":24.792332268370586,"swl":null,"pwl":50.47,"tdh":46.129999999999995,"pressure":3},
{"time":"2015-07-30T02:59:19.000Z","flowRate":74,"scRatio":24.792332268370586,"swl":null,"pwl":58.24,"tdh":54.67999999999999,"pressure":4.6},
{"time":"2015-07-30T03:00:00.000Z","flowRate":0,"scRatio":24.792332268370586,"swl":null,"pwl":50.83,"tdh":45.769999999999996,"pressure":3},
{"time":"2015-08-01T05:22:06.000Z","flowRate":null,"scRatio":null,"swl":null,"pwl":58.29,"tdh":54.629999999999995,"pressure":4.6},
{"time":"2015-08-01T05:25:00.000Z","flowRate":null,"scRatio":null,"swl":null,"pwl":50.21,"tdh":46.39,"pressure":3}]
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment