Browse Source

Fix placement of points in bar's side-by-side view

Fix no-group data input case.
newShading
Ludo Stellingwerff 9 years ago
parent
commit
57a4c1f562
2 changed files with 6 additions and 3 deletions
  1. +5
    -2
      lib/timeline/component/LineGraph.js
  2. +1
    -1
      lib/timeline/component/graph2d_types/bar.js

+ 5
- 2
lib/timeline/component/LineGraph.js View File

@ -478,8 +478,11 @@ LineGraph.prototype._updateAllGroupData = function () {
this._onRemoveGroups([groupId]);
}
} else {
var group = this.groupsData.get(groupId);
if (group === undefined) {
var group = undefined;
if (this.groupsData != undefined) {
group = this.groupsData.get(groupId);
}
if (group == undefined) {
group = {id: groupId, content: this.options.defaultGroup + groupId};
}
this._updateGroup(group, groupId);

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

@ -120,7 +120,7 @@ Bargraph.draw = function (groupIds, processedGroupData, framework) {
// draw points
if (group.options.drawPoints.enabled === true) {
let pointData = {
x:combinedData[i].x + drawData.offset,
x:combinedData[i].x,
y:combinedData[i].y - heightOffset,
groupId: combinedData[i].groupId,
label: combinedData[i].label,

Loading…
Cancel
Save