Home Forums Report Bugs Crosshair Label is Not Shown for Last Datapoint with Logarithmic X-Axis

Crosshair Label is Not Shown for Last Datapoint with Logarithmic X-Axis

Viewing 8 posts - 1 through 8 (of 8 total)
  • #32669

    See Fiddle here: https://jsfiddle.net/s6qkmhcj/. The crosshair label will show 99,001 but not 100,000.

    Another issue is that the Y-Axis grid lines do not extend all the way to the rightmost X-Axis grid line on the above-linked chart.

    #32676

    @bfailing,

    See Fiddle here: https://jsfiddle.net/s6qkmhcj/. The crosshair label will show 99,001 but not 100,000.

    When snapToDataPoint is set to true, it will snap the crosshair to the nearest dataPoint based on mouse coordinate. In the case of a logarithmic axis, 99,001 will be nearer towards the extreme right compared to 100,000 due to which the crosshair label shows 99001. If you zoom-into the extreme right end of the chart and you can observe 100,000 in crosshair label.

    Another issue is that the Y-Axis grid lines do not extend all the way to the rightmost X-Axis grid line on the above-linked chart.

    Thanks for reporting the use-case. We will improve this in future versions.


    Shashi Ranjan
    Team CanvasJS

    #32680

    This is definitely a bug. The crosshair remains displayed, but the crosshair label is hidden. In other words, it is snapping to the last data point but not displaying the value in the crosshair label.

    If you can’t replicate it, try making the chart wider. Here is another example that may make it easier to see: https://jsfiddle.net/01dtnkme/. Again, if you can’t see it, make it wider.

    #32689

    @bfailing,

    It seems to be working fine at our end. Please refer to the screenshot below.

    crosshair with label


    Shashi Ranjan
    Team CanvasJS

    #32691

    I can’t attach a screenshot (your forum won’t allow it apparently), but this occurred at these random window sizes (from the upper-right corner of the Fiddle chart window): 832px, 1045px, and 1484px. This occurred in Firefox, Chrome, and Edge on a Windows 10 machine.

    #32708

    @bfailing,

    Thank you for sharing the details. Unfortunately, we are unable to reproduce the issue at our end even with the JSFiddle result window width provided above(832px, 1045px, and 1484px). Can you take a screenshot in which the issue is reproduced, upload it Imgur and share the link with us so that we can understand the scenario better and help you out.


    Shashi Ranjan
    Team CanvasJS

    #32709

    There’s no point in showing a screenshot. It would look like the one you posted except the black “100,000” label is hidden.

    This also occurred on a Pinebook Pro (Linux laptop) in Firefox tested at 832px.

    BTW, “upper-right corner of the Fiddle chart window” in my previous message should have been “upper-left corner of the Fiddle chart window”.

    #32745

    @bfailing,

    Chart seems to be working fine when tested at the above-mentioned width. However to be absolutely sure, we are testing the use-case across various browsers & devices and we will get back to you at the earliest.


    Shashi Ranjan
    Teanm CanvasJS

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.