You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when drawing a parallel channel the chart should take into accoun the logarithmic scale and appear parallel to end user even in that case.. that is how stock trader would use
Actual behaviour
when in logarithmic mode, it gets skewed which is incorrect
(function(H){H.wrap(H.Annotation.types.tunnel.prototype,'getPointsOptions',patch16769);functionpatch16769(proceed, ...args){constpoints=proceed.apply(this,args),yAxisIndex=points[0].yAxis,yAxis=this.chart.yAxis[yAxisIndex];// In case of log axis, translate the bottom left point againif(yAxis&&yAxis.logarithmic){// Get the height in pixelsconsth=yAxis.toPixels(points[2].y)-yAxis.toPixels(points[1].y),// Get the pixel position of the last pointy3=yAxis.toPixels(points[0].y)+h;// Set the new valuepoints[3].y=yAxis.toValue(y3);}returnpoints;}})(Highcharts);
Internal note:
It's caused by using height to control all bottom points. We simply add height value to the first two points' values in heightPointOptions(). Even though it's mathematically correct, visually we can observe the skew. For example this demo: (tunnel has height=20)
Expected behaviour
when drawing a parallel channel the chart should take into accoun the logarithmic scale and appear parallel to end user even in that case.. that is how stock trader would use
Actual behaviour
when in logarithmic mode, it gets skewed which is incorrect
Live demo with steps to reproduce
https://jsfiddle.net/anoosurf/uzwvrhjt/3/
Product version
highcharts /highstock 9.3.2
Affected browser(s)
The text was updated successfully, but these errors were encountered: