From 1aca8e6a670c32b9e03683ad907e473f920b2e6a Mon Sep 17 00:00:00 2001 From: Martin Lepadusch Date: Wed, 11 Mar 2015 13:04:21 +0100 Subject: [PATCH] Show labels on Bargraph --- lib/timeline/component/graph2d_types/bar.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/timeline/component/graph2d_types/bar.js b/lib/timeline/component/graph2d_types/bar.js index 3dee4b21..4c351308 100644 --- a/lib/timeline/component/graph2d_types/bar.js +++ b/lib/timeline/component/graph2d_types/bar.js @@ -58,7 +58,8 @@ Bargraph.draw = function (groupIds, processedGroupData, framework) { combinedData.push({ x: processedGroupData[groupIds[i]][j].x, y: processedGroupData[groupIds[i]][j].y, - groupId: groupIds[i] + groupId: groupIds[i], + label: processedGroupData[groupIds[i]][j].label, }); barPoints += 1; } @@ -114,7 +115,7 @@ Bargraph.draw = function (groupIds, processedGroupData, framework) { DOMutil.drawBar(combinedData[i].x + drawData.offset, combinedData[i].y - heightOffset, drawData.width, group.zeroPosition - combinedData[i].y, group.className + ' bar', framework.svgElements, framework.svg); // draw points if (group.options.drawPoints.enabled == true) { - DOMutil.drawPoint(combinedData[i].x + drawData.offset, combinedData[i].y, group, framework.svgElements, framework.svg); + DOMutil.drawPoint(combinedData[i].x + drawData.offset, combinedData[i].y, group, framework.svgElements, framework.svg, combinedData[i].label); } } }; @@ -226,4 +227,4 @@ Bargraph._getStackedBarYRange = function (intersections, combinedData) { return {min: yMin, max: yMax}; }; -module.exports = Bargraph; \ No newline at end of file +module.exports = Bargraph;