summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/js/trend-qtip.js
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2017-11-10 15:43:35 -0800
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-11-10 15:45:32 -0800
commitf11f26d23dabde24b0bcd67ac81b094aa89eb6c9 (patch)
tree500546f6f553b049eb9ac146e7c8359d073fbf7a /utils/test/reporting/js/trend-qtip.js
parent122cf34bf3e656e1b7fa35e07dd8a71e42ed4d59 (diff)
Remove 'utils/test' Directory and update INFO
utils/test has been migrated to the releng-testresults repo Change-Id: If14a30e6abed1424d1e00b0fae048b7d869ec99b Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'utils/test/reporting/js/trend-qtip.js')
-rw-r--r--utils/test/reporting/js/trend-qtip.js76
1 files changed, 0 insertions, 76 deletions
diff --git a/utils/test/reporting/js/trend-qtip.js b/utils/test/reporting/js/trend-qtip.js
deleted file mode 100644
index d4c8735d9..000000000
--- a/utils/test/reporting/js/trend-qtip.js
+++ /dev/null
@@ -1,76 +0,0 @@
-// ******************************************
-// Trend line for reporting
-// based on scenario_history.txt
-// where data looks like
-// date,scenario,installer,detail,score
-// 2016-09-22 13:12,os-nosdn-fdio-noha,apex,4/12,33.0
-// 2016-09-22 13:13,os-odl_l2-fdio-noha,apex,12/15,80.0
-// 2016-09-22 13:13,os-odl_l2-sfc-noha,apex,18/24,75.0
-// .....
-// ******************************************
-// Set the dimensions of the canvas / graph
-var trend_margin = {top: 20, right: 30, bottom: 50, left: 40},
- trend_width = 300 - trend_margin.left - trend_margin.right,
- trend_height = 130 - trend_margin.top - trend_margin.bottom;
-
-// Parse the date / time
-var parseDate = d3.time.format("%Y-%m-%d %H:%M").parse;
-
-// Set the ranges
-var trend_x = d3.time.scale().range([0, trend_width]);
-var trend_y = d3.scale.linear().range([trend_height, 0]);
-
-// Define the axes
-var trend_xAxis = d3.svg.axis().scale(trend_x)
- .orient("bottom").ticks(2).tickFormat(d3.time.format("%m-%d"));
-
-var trend_yAxis = d3.svg.axis().scale(trend_y)
- .orient("left").ticks(4, "s");
-
-// Define the line
-var valueline = d3.svg.line()
- .x(function(d) { return trend_x(d.date); })
- .y(function(d) { return trend_y(d.score); });
-
-var trend = function(container, trend_data) {
-
- var trend_svg = d3.select(container)
- .append("svg")
- .attr("width", trend_width + trend_margin.left + trend_margin.right)
- .attr("height", trend_height + trend_margin.top + trend_margin.bottom)
- .attr("style", "font-size: small")
- .append("g")
- .attr("transform",
- "translate(" + trend_margin.left + "," + trend_margin.top + ")");
-
- // Scale the range of the data
- trend_x.domain(d3.extent(trend_data, function(d) { return d.date; }));
- trend_y.domain([0, d3.max(trend_data, function(d) { return d.score; })]);
-
- // Add the X Axis
- trend_svg.append("g")
- .attr("class", "x axis")
- .attr("transform", "translate(0," + trend_height + ")")
- .call(trend_xAxis);
-
- // Add the Y Axis
- trend_svg.append("g")
- .attr("class", "y axis")
- .call(trend_yAxis);
-
- // Add the valueline path.
- trend_svg.append("path")
- .attr("class", "line")
- .attr("d", valueline(trend_data))
- .attr("stroke", "steelblue")
- .attr("fill", "none");
-
- trend_svg.selectAll(".dot")
- .data(trend_data)
- .enter().append("circle")
- .attr("r", 2.5)
- .attr("cx", function(d) { return trend_x(d.date); })
- .attr("cy", function(d) { return trend_y(d.score); });
-
- return trend;
-}