summaryrefslogtreecommitdiffstats
path: root/src/chart_template.html
blob: 0a4b81a1663fbb762e561d6bf742e6777d9b517e (plain)
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
104
105
106
107
108
109
110
		<div>
			<h3>
			<! Test Name Here>
			</h3>
			<div id=
                <! Chart ID Here>
             style="width:900px;height:350px;"></div>

            <table cellspacing = "10"><tr>
            
            <td valign = "top">
            <form id=
                <! Form ID Here>
            <b> Data series </b><br>
            </form>
            </td>

            <td valign = "top">
            <form id=
                <! ChartTypeForm ID Here>
            <b> Chart Type </b><br>
            </form>
            </td>

            <td valign = "top">
            <form id=
                <! ScaleForm ID Here>
            <b> Scale </b><br>
            </form>
            </td>

            </tr></table>

     	</div>
		<script type="text/javascript">
            var chartId = 
            <! Chart ID Here>
            ;

            var chartType = 
            <! Chart Type Here>
            ;

           var seriesLabels = 
           <! Series Labels Here>

			var dataset = [];
			<! Data Goes Here>

            var labels = [
                <! Labels Go Here>
            ];
            
            var colors = new Hash({
                <! ColorScheme Here>
            });

            var shouldFill = 
           <! Fill Setting Here>
           ;

           var form = document.getElementById(
           <! Form ID Here>
           );

           var chartTypeForm = document.getElementById(
           <! ChartTypeForm ID Here>
           );

           var scaleForm = document.getElementById(
           <! ScaleForm ID Here>
           );



           var chartOptions = new Object();
           chartOptions.chartId = chartId;
           chartOptions.chartType = chartType;
           chartOptions.dataset = dataset;
           chartOptions.colors = colors;
           chartOptions.shouldFill = shouldFill;
           chartOptions.labels = labels;
           chartOptions.seriesLabels = seriesLabels;
           chartOptions.useLineChart = true;
           chartOptions.useLinearScale = true;
           chartOptions.createChart = createChart;

           chartOptions.ticks = labels;
           chartOptions.barWidth = 0.5;
           chartOptions.tickOffset = 0.25;

           chartOptions.useLineChart = 
                <! Use Line Chart Here>

           chartOptions.chartTypeForm = chartTypeForm;
           chartOptions.buildChartTypeSelector = buildChartTypeSelector;
           chartOptions.buildChartTypeSelector();

           chartOptions.scaleForm = scaleForm;
           chartOptions.buildScaleSelector = buildScaleSelector;
           chartOptions.buildScaleSelector();

           chartOptions.selectedDataset = dataset;
           chartOptions.checkform = checkform;
           chartOptions.form = form;
           chartOptions.buildSeriesSelector = buildSeriesSelector;
           chartOptions.buildSeriesSelector(form, chartOptions);
           chartOptions.checkform();
		</script>