Home Forums Chart Support Changing markerSize on hover for Area chart

Changing markerSize on hover for Area chart

  • This topic has 6 replies, 3 voices, and was last updated 2 years ago by Rck.
Viewing 7 posts - 1 through 7 (of 7 total)
  • #20781

    Hello,
    I have an area chart and I’d like for markers to be hidden by default, but displayed with a custom markerSize when tooltip is visible.

    Unfortunately it looks like the api makes it impossible because:
    1. “markerSize” has to be set to “0” in order to hide markers by default(which is unintuitive to be honest, an option like “showByDefault” would make it a non-issue)
    2. there is no event for when tooltip is displayed
    3. mouseover and mousemove events only trigger for the line, not for the entire area unlike the event tooltips use internally

    Here’s the example:
    http://jsfiddle.net/1nkkanot/1/

    Did I miss something or is it not possible to achieve?
    Thank you.

    #20784

    @brian2304,

    Sorry, this feature is not available as of now. However setting markerSize to ‘0’ will make marker to be visible only on mouseover with default size. Please take a look at this jsfiddle.


    Vishwas R
    Team CanvasJS

    #39465

    Rck

    Hello Vishwas,

    We are now 4 years later and I need the same feature as Brian :)
    Is there any way to have bigger markersize on mouseover with marker hidden by default ?

    Thanks !
    If not available, please put this in todo list :)

    #39474

    @rck,

    By default marker borders are disabled & are not shown around the marker. Setting markerBorderThickness to a value greater than 0 will add border to the marker & makes it look bigger. Please take a look at this JSFiddle for an example on hiding markers by default but showing a bigger marker on mouse hover.

    Show Bigger Marker on Mouse Hover


    Vishwas R
    Team CanvasJS

    #39488

    Rck

    Hello Vishwas

    Thanks for the tips, it can be usefull for a lot of users :)
    However in my use case it will not work, because I need to keep the border grey to correctly see the points.
    And I don’t want to have fat border here :p
    I want to keep thin border :)

    Maybe I can just modify the canvasjs source code to have bigger point ?
    Do you know which line should I modify ?

    Thanks!

    #39508

    @rck,

    Unfortunately, it’s not possible to have custom marker-size on hover as of now.


    Vishwas R
    Team CanvasJS

    #39509

    Rck

    No problem, maybe you can suggest this new feature to dev for futur release, it should not be complicated to add :)
    In meantime, if you have any tips to modify canvasjs.js to change the default marker size from 10 to 20px it would be perfect.

    Thanks!

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

You must be logged in to reply to this topic.