Legend with proximate option #8638
Closed
Labels
Comments
Thanks for reporting @VBIManonmaniM ! |
Workaround: Replace current poximate positions: (function(H) {
H.Legend.prototype.proximatePositions = function() {
var chart = this.chart,
boxes = [],
alignLeft = this.options.align === 'left';
H.each(this.allItems, function(item) {
var lastPoint,
height,
useFirstPoint = alignLeft;
if (item.xAxis && item.points) {
if (item.xAxis.options.reversed) {
useFirstPoint = !useFirstPoint;
}
lastPoint = H.find(
useFirstPoint ?
item.points :
item.points.slice(0).reverse(),
function(item) {
return H.isNumber(item.plotY);
}
);
height = item.legendGroup.getBBox().height;
boxes.push({
target: item.visible ?
(lastPoint && lastPoint.plotY || item.xAxis.height) - 0.3 * height : chart.plotHeight, // Fix #8638
size: height,
item: item
});
}
}, this);
H.distribute(boxes, chart.plotHeight);
H.each(boxes, function(box) {
box.item._legendItemPos[1] =
chart.plotTop - chart.spacing[0] + box.pos;
});
}
})(Highcharts); |
@pawelfus Thank you for your reply, When this fix will release. |
Just added PR with fix, if this will get merged into master, then it will be part of v6.1.2 release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behaviour
Legend with proximate option have to work with all kind of Series Data.
Actual behaviour
But it is not working properly with Series with all null data
Live demo with steps to reproduce
https://jsfiddle.net/v24xsjh8/4/
Product version
Highcharts
Affected browser(s)
All browsers
The text was updated successfully, but these errors were encountered: