0
|
1 |
<div>
|
|
2 |
<h3>
|
|
3 |
<! Test Name Here>
|
|
4 |
</h3>
|
|
5 |
<div id=
|
|
6 |
<! Chart ID Here>
|
|
7 |
style="width:900px;height:350px;"></div>
|
|
8 |
|
|
9 |
<table cellspacing = "10"><tr>
|
|
10 |
|
|
11 |
<td valign = "top">
|
|
12 |
<form id=
|
|
13 |
<! Form ID Here>
|
|
14 |
<b> Data series </b><br>
|
|
15 |
</form>
|
|
16 |
</td>
|
|
17 |
|
|
18 |
<td valign = "top">
|
|
19 |
<form id=
|
|
20 |
<! ChartTypeForm ID Here>
|
|
21 |
<b> Chart Type </b><br>
|
|
22 |
</form>
|
|
23 |
</td>
|
|
24 |
|
|
25 |
<td valign = "top">
|
|
26 |
<form id=
|
|
27 |
<! ScaleForm ID Here>
|
|
28 |
<b> Scale </b><br>
|
|
29 |
</form>
|
|
30 |
</td>
|
|
31 |
|
|
32 |
</tr></table>
|
|
33 |
|
|
34 |
</div>
|
|
35 |
<script type="text/javascript">
|
|
36 |
var chartId =
|
|
37 |
<! Chart ID Here>
|
|
38 |
;
|
|
39 |
|
|
40 |
var chartType =
|
|
41 |
<! Chart Type Here>
|
|
42 |
;
|
|
43 |
|
|
44 |
var seriesLabels =
|
|
45 |
<! Series Labels Here>
|
|
46 |
|
|
47 |
var dataset = [];
|
|
48 |
<! Data Goes Here>
|
|
49 |
|
|
50 |
var labels = [
|
|
51 |
<! Labels Go Here>
|
|
52 |
];
|
|
53 |
|
|
54 |
var colors = new Hash({
|
|
55 |
<! ColorScheme Here>
|
|
56 |
});
|
|
57 |
|
|
58 |
var shouldFill =
|
|
59 |
<! Fill Setting Here>
|
|
60 |
;
|
|
61 |
|
|
62 |
var form = document.getElementById(
|
|
63 |
<! Form ID Here>
|
|
64 |
);
|
|
65 |
|
|
66 |
var chartTypeForm = document.getElementById(
|
|
67 |
<! ChartTypeForm ID Here>
|
|
68 |
);
|
|
69 |
|
|
70 |
var scaleForm = document.getElementById(
|
|
71 |
<! ScaleForm ID Here>
|
|
72 |
);
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
var chartOptions = new Object();
|
|
77 |
chartOptions.chartId = chartId;
|
|
78 |
chartOptions.chartType = chartType;
|
|
79 |
chartOptions.dataset = dataset;
|
|
80 |
chartOptions.colors = colors;
|
|
81 |
chartOptions.shouldFill = shouldFill;
|
|
82 |
chartOptions.labels = labels;
|
|
83 |
chartOptions.seriesLabels = seriesLabels;
|
|
84 |
chartOptions.useLineChart = true;
|
|
85 |
chartOptions.useLinearScale = true;
|
|
86 |
chartOptions.createChart = createChart;
|
|
87 |
|
|
88 |
chartOptions.ticks = labels;
|
|
89 |
chartOptions.barWidth = 0.5;
|
|
90 |
chartOptions.tickOffset = 0.25;
|
|
91 |
|
|
92 |
chartOptions.useLineChart =
|
|
93 |
<! Use Line Chart Here>
|
|
94 |
|
|
95 |
chartOptions.chartTypeForm = chartTypeForm;
|
|
96 |
chartOptions.buildChartTypeSelector = buildChartTypeSelector;
|
|
97 |
chartOptions.buildChartTypeSelector();
|
|
98 |
|
|
99 |
chartOptions.scaleForm = scaleForm;
|
|
100 |
chartOptions.buildScaleSelector = buildScaleSelector;
|
|
101 |
chartOptions.buildScaleSelector();
|
|
102 |
|
|
103 |
chartOptions.selectedDataset = dataset;
|
|
104 |
chartOptions.checkform = checkform;
|
|
105 |
chartOptions.form = form;
|
|
106 |
chartOptions.buildSeriesSelector = buildSeriesSelector;
|
|
107 |
chartOptions.buildSeriesSelector(form, chartOptions);
|
|
108 |
chartOptions.checkform();
|
|
109 |
</script>
|
|
110 |
|