Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(582)

Side by Side Diff: frontend/croschart/templates/plot_chart.html

Issue 6821082: Integrate dynamic charts into autotest frontend. (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: Add license. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 {% extends "base.html" %}
2 {% comment %}
3
4 Copyright 2010 Google Inc. All Rights Reserved.
5
6 This template builds a single plot on a single page for a zoomed-in view.
7 {% endcomment %}
8 {% block title %}ChromeOS Performance Chart{% endblock %}
9 {% block html_block %}
10 <!--Load the AJAX API-->
11 <script type="text/javascript" src="https://www.google.com/jsapi"></script>
12 <script type="text/javascript">
13 // Load the Visualization API and the piechart package.
14 google.load('visualization', '1', {'packages':['corechart']});
15
16 // Set a callback to run when the Google Visualization API is loaded.
17 google.setOnLoadCallback(drawCharts);
18
19 // Callback that creates and populates a data table,
20 // instantiates the charts, passes in the data and
21 // draws them.
22 function drawCharts() {
23 var chart = new google.visualization.LineChart(
24 document.getElementById('{{ tpl_gviz_id }}'));
25 var json_data = new google.visualization.DataTable(
26 {% autoescape off %}{{ tpl_gviz_js }}{% endautoescape %}, 0.5);
27 google.visualization.events.addListener(chart, 'select', function(){
28 var build_tags = [
29 {% for job_tag in tpl_job_tags %}
30 '{{ job_tag }}'{% if not forloop.last %},{% endif %}
31 {% endfor %}
32 ];
33 window.open(
34 'http://cautotest/results/' +
35 build_tags[chart.getSelection()[0].row] +
36 '/' + '{{ tpl_gviz_title }}' +
37 '/results/keyval')
38 });
39 chart.draw(
40 json_data,
41 {colors: ['{{ tpl_colors|random }}'],
42 hAxis: {
43 slantedText: true,
44 slantedTextAngle: 90,
45 textStyle: {fontSize: 10}},
46 height: {{ tpl_height }},
47 is3D: true,
48 pointSize: 3,
49 legend: 'none',
50 title: '{{ tpl_gviz_title }} - {{ tpl_perf_key }}',
51 titlePosition: 'out',
52 width: {{ tpl_width }}});
53 }
54 </script>
55 <center>
56 <span id="{{ tpl_gviz_id }}"></span>
57 </center>
58 {% endblock %}
OLDNEW
« no previous file with comments | « frontend/croschart/templates/charts.html ('k') | frontend/croschart/templates/plot_unavailable.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698