dygraphs
dygraphs copied to clipboard
toDomXCoord doesn't take log scale into account
fiddle at http://jsfiddle.net/04h3r3aL/3/ shows the issue clearly. toDataXCoord seems to produce a reasonable value, but going the other way it's pretty obvious that it's treating the scale as linear. It does work correctly for the y axis.
I'm seeing this on firefox 47, windows 7 with the current dygraph version.
FWIW fix looks like:
range = graph.xAxisRange();
return area.x + (Math.log10(x) - Math.log10(range[0])) / (Math.log10(range[1]) - Math.log10(range[0])) * area.w;