Home | History | Annotate | Download | only in front-end

Lines Matching refs:segments

137     _drawSummaryGraph: function(segments)
139 if (!segments || !segments.length) {
140 segments = [{color: "white", value: 1}];
145 // Calculate the total of all segments.
147 for (var i = 0; i < segments.length; ++i)
148 total += segments[i].value;
151 var percents = segments.map(function(s) { return Math.max(Math.round(100 * s.value / total), 1) });
159 // if we rounded up for a few segments.
170 // if we rounded down for a few segments.
246 // Fill the segments with the associated color.
248 for (var i = 0; i < segments.length; ++i) {
250 ctx.fillStyle = segments[i].color;