mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-11 05:46:37 +01:00
063957657c
Uses perceptualdiff to catch regressions / changes in charts as they are displayed by a browser (in this case, phantomjs). Currently has exemplaries for basic line, area, bar and stacked bar charts.
33 lines
719 B
HTML
33 lines
719 B
HTML
<!doctype html>
|
|
<head>
|
|
<script src="../../third_party/jquery-1.8.2.min.js"></script>
|
|
<script src="../../third_party/raphael-2.1.0.min.js"></script>
|
|
<script src="../../morris.js"></script>
|
|
<link rel="stylesheet" href="../../morris.css">
|
|
<style>
|
|
body {
|
|
padding: 0;
|
|
margin: 0;
|
|
background-color: white;
|
|
}
|
|
#chart {
|
|
width: 500px;
|
|
height: 300px;
|
|
}
|
|
</style>
|
|
<script>
|
|
function bridge(e) {
|
|
window.alert(JSON.stringify(e));
|
|
}
|
|
window.snapshot = function () {
|
|
bridge({ fn: "snapshot" });
|
|
};
|
|
window.mousemove = function (x, y) {
|
|
bridge({ fn: "mousemove", x: x, y: y });
|
|
};
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="chart"></div>
|
|
</body>
|