tvcharts 0.8.86 → 0.8.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -81,6 +81,7 @@ var fillsLayout = {
|
|
|
81
81
|
var dimIdx0 = 0;
|
|
82
82
|
var dimIdP1 = 1;
|
|
83
83
|
var dimIdP2 = 2;
|
|
84
|
+
var barWidthOffset = Math.floor(seriesModel.coordinateSystem.getAxesByScale('ordinal')[0].scale.barSpace * 0.8 / 2) || 0.5;
|
|
84
85
|
var store = data.getStore();
|
|
85
86
|
return {
|
|
86
87
|
progress: function (params, fillsData) {
|
|
@@ -125,11 +126,20 @@ var fillsLayout = {
|
|
|
125
126
|
if (fillgaps) {
|
|
126
127
|
continue;
|
|
127
128
|
}
|
|
128
|
-
if (!lastKey
|
|
129
|
+
if (!lastKey) {
|
|
129
130
|
lastKey = '';
|
|
130
131
|
plot1Points = [];
|
|
131
132
|
plot2Points = [];
|
|
132
133
|
continue;
|
|
134
|
+
} else if (lastKey && plot1Points.length <= 1) {
|
|
135
|
+
var _b = plot1Points[0],
|
|
136
|
+
x1 = _b[0],
|
|
137
|
+
y1 = _b[1];
|
|
138
|
+
var _c = plot2Points[0],
|
|
139
|
+
x2 = _c[0],
|
|
140
|
+
y2 = _c[1];
|
|
141
|
+
plot1Points = [[x1 - barWidthOffset, y1], [x1 + barWidthOffset, y1]];
|
|
142
|
+
plot2Points = [[x2 - barWidthOffset, y2], [x2 + barWidthOffset, y2]];
|
|
133
143
|
}
|
|
134
144
|
var keyPoints = pointsByColor[lastKey] || [];
|
|
135
145
|
keyPoints.push(plot1Points.concat(plot2Points.reverse()));
|