Home forums Using CanvasJS Alter lineThickness on mouseover?

This topic contains 2 replies, has 2 voices, and was last updated by  jerrygarciuh 3 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15403

    jerrygarciuh
    Member

    With a data.mouseover defined like so the initial console log correctly gives the initial lineThickness value and then subsequent mouseovers give the value I set but lineThickness is not altered in chart.

    Would I have to re-render to see it?

     data: [
    		  {
    			type: "line",
    			mouseover: function(e){
    				console.log(e.chart.axisX[0].lineThickness);
    				e.chart.axisX[0].lineThickness = 5;
    				return;
    			},
    #15422

    Bivek Singh
    Moderator

    @jerrygarciuh

    After changing the value, you’ll need to re-render the chart to observe the changes. You can also use set method to change different properties of the chart. Please, take a look at this jsFiddle.

    —-
    Bivek Singh,
    Team CanvasJS

    #15428

    jerrygarciuh
    Member

    Thank you so much!

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

You must be logged in to reply to this topic.