Skip to content

Instantly share code, notes, and snippets.

@LarsBergqvist

LarsBergqvist/index.html

Last active Jul 11, 2016
Embed
What would you like to do?
<!DOCTYPE html>
<html ng-app="app" lang="en">
<head>
<meta charset="utf-8" />
<title>Sensor data</title>
<script src="/static/node_modules/angular/angular.js"></script>
<script src="/static/node_modules/chart.js/dist/Chart.min.js"></script>
<script src="/static/node_modules/angular-chart.js/dist/angular-chart.min.js"></script>
<script src="/static/app.js"></script>
</head>
<body>
<h1>Sensor data</h1>
<div ng-controller="ChartCtrl">
<label>Number of days:
<input type="number" min="1" ng-change="numdaysChanged()" ng-model="numdays" />
</label>
<div ng-repeat="item in data">
<h2 ng-bind="titles[$index]"></h2>
<canvas id="line" class="chart chart-line" chart-data="data[$index]"
chart-labels="labels[$index]" chart-series="series" chart-options="options"" chart-dataset-override="item.datasetOverride" chart-click="onClick">
</canvas>
</div>
</div>
</body></html>
Status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.