1<!DOCTYPE html> 2<!-- 3Copyright (c) 2015 The Chromium Authors. All rights reserved. 4Use of this source code is governed by a BSD-style license that can be 5found in the LICENSE file. 6--> 7 8<link rel="import" href="/tracing/model/proxy_selectable_item.html"> 9 10<script> 11'use strict'; 12 13tr.exportTo('tr.ui.tracks', function() { 14 15 /** 16 * A point in a chart series with x (timestamp) and y (value) coordinates 17 * and an associated model item. The point can optionally also have a base 18 * y coordinate (which for example corresponds to the bottom edge of the 19 * associated bar in a bar chart). 20 * 21 * @constructor 22 * @extends {ProxySelectableItem} 23 */ 24 function ChartPoint(modelItem, x, y, opt_yBase) { 25 tr.model.ProxySelectableItem.call(this, modelItem); 26 this.x = x; 27 this.y = y; 28 29 // If the base y-coordinate is undefined, the bottom edge of the associated 30 // bar in a bar chart will start at the outer bottom edge (which is most 31 // likely slightly below zero). 32 this.yBase = opt_yBase; 33 }; 34 35 ChartPoint.prototype = { 36 __proto__: tr.model.ProxySelectableItem.prototype 37 }; 38 39 return { 40 ChartPoint: ChartPoint 41 }; 42}); 43</script> 44