Browse Source

Merge pull request #707 from m4r71n/labels-on-bargraph

Show labels also on Bargraph - thanks!
v3_develop
Alex 9 years ago
parent
commit
0f850c6922
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