Browse Source

Show labels on Bargraph

v3_develop
Martin Lepadusch 9 years ago
parent
commit
1aca8e6a67
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      lib/timeline/component/graph2d_types/bar.js

+ 4
- 3
lib/timeline/component/graph2d_types/bar.js View File

@ -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;
module.exports = Bargraph;

Loading…
Cancel
Save