-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLineChart.html
More file actions
103 lines (95 loc) · 4.2 KB
/
Copy pathLineChart.html
File metadata and controls
103 lines (95 loc) · 4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>MindFusion Charting Sample - LineChart</title>
<link href="common/samples.css" rel="stylesheet" />
<script type="text/javascript" src="common/samples.js"></script>
</head>
<body>
<input type="hidden" id="collapsed" />
<div id="header">
<div style="float: left; margin-left: 5px;">
<a href="index.html" style="margin-left: 10px;">Index</a>
</div>
<div style="float: right; margin-right: 5px;">
<a href="LineChart.js" style="margin-right: 10px;">View source</a>
<button id="expandButton" onclick="onExpandCollapse()">
›
</button>
</div>
</div>
<div id="info">
<div id="infoTab" style="padding: 10px;">
<h1>
Interactive Data Trends
</h1>
<p id="pinfo">
This sample demonstrates the LineChart control, featuring interactive panning, zooming,
and customizable axes. Use the controls below to adjust ranges and visual properties.
</p>
</div>
</div>
<div id="content">
<div id="controls" style="height: auto; max-height: 250px; overflow-y: auto;">
<div class="control-row" style="margin-bottom: 15px;">
<div style="display: inline-block; margin-right: 20px;">
<label for="gridType">Grid Type</label>
<select id="gridType">
<option value="0">None</option>
<option value="1">Horizontal</option>
<option value="2">Vertical</option>
<option value="3">Crossed</option>
</select>
</div>
<div style="display: inline-block; margin-right: 20px;">
<label for="lineType">Line Type</label>
<select id="lineType">
<option value="0">Polyline</option>
<option value="1">Step</option>
<option value="2">Curve</option>
</select>
</div>
</div>
<div class="control-row" style="margin-bottom: 10px;">
<strong>Axis Limits:</strong>
<label style="margin-left: 10px;">X Min <input type="range" id="xAxisMin" min="0" max="10" style="width: 80px;" /></label>
<label>X Max <input type="range" id="xAxisMax" min="0" max="24" style="width: 80px;" /></label>
<label style="margin-left: 10px;">Y Min <input type="range" id="yAxisMin" min="0" max="10" style="width: 80px;" /></label>
<label>Y Max <input type="range" id="yAxisMax" min="0" max="24" style="width: 80px;" /></label>
</div>
<div class="control-row" style="margin-bottom: 15px;">
<strong>Scroll Ranges:</strong>
<label style="margin-left: 10px;">X Min <input type="range" id="xRangeMin" min="-100" max="100" value="-50" style="width: 80px;" /></label>
<label>X Max <input type="range" id="xRangeMax" min="-100" max="100" value="50" style="width: 80px;" /></label>
<label style="margin-left: 10px;">Y Min <input type="range" id="yRangeMin" min="-100" max="100" value="-50" style="width: 80px;" /></label>
<label>Y Max <input type="range" id="yRangeMax" min="-100" max="100" value="50" style="width: 80px;" /></label>
</div>
<div class="control-row">
<label><input type="checkbox" id="showXticks"> X Ticks</label>
<label><input type="checkbox" id="showYticks"> Y Ticks</label>
<label><input type="checkbox" id="showXCoords"> X Coords</label>
<label><input type="checkbox" id="showYCoords"> Y Coords</label>
<label><input type="checkbox" id="showXRange"> X Selector</label>
<label><input type="checkbox" id="showYRange"> Y Selector</label>
<label><input type="checkbox" id="showLegend"> Legend</label>
<label><input type="checkbox" id="scrollGrid"> Scroll Grid</label>
<label><input type="checkbox" id="showDataLabels"> Data Labels</label>
</div>
</div>
<div style="position: absolute; left: 0px; top: 250px; bottom: 0px; right: 0px">
<canvas id="lineChart" style="width: 100%; height: 100%; display: block;">
</canvas>
</div>
</div>
<div id="footer">
<span id="copyright"></span>
</div>
<script src="Scripts/drawing.js" type="text/javascript"></script>
<script src="Scripts/controls.js" type="text/javascript"></script>
<script src="Scripts/common.js" type="text/javascript"></script>
<script src="Scripts/common-collections.js" type="text/javascript"></script>
<script src="Scripts/charting.js" type="text/javascript"></script>
<script type="text/javascript" src="LineChart.js"></script>
</body>
</html>