Menu

Changing marker on click

faith
2012-11-14
2012-12-04
  • faith

    faith - 2012-11-14

    Hi,

    I have a requirement to change the marker when user clicks on a particular point. Is it possible or are there any workarounds?

    Thanks in advance

     
  • faith

    faith - 2012-11-15

    Any help??

     
  • Shawn Quinn

    Shawn Quinn - 2012-12-04

    You can control the selection state of a marker via the "setSelectState" method. E.g.

    chart.setSeriesPlotOptions(new SeriesPlotOptions()
        .setMarker(new Marker()
            .setEnabled(true)
            .setFillColor("#CC0000")
            .setRadius(4)
            .setSelectState(new Marker()
                .setEnabled(true)
                .setFillColor("#00CC00")
                .setRadius(6)
            )
        )
    );
    

    Other than that, I'm guessing you'd have to resort to JSNI/DOM manipulation on your own. It'd definitely be worth a search/post on the main Highcharts forums first though to see if anyone has any other options to propose.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.