Home forums Chart Support Show Tooltip without Mouse Hover

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #30670

    How can i show Tooltip without mouse hover by default.
    my Data looks Like:

    dataPoints: [
          { x: new Date(2017,6,24), y: 302 },
          { x: new Date(2017,6,25), y: 3100 },
          { x: new Date(2017,6,26), y: 750 },
          { x: new Date(2017,6,26), y: 750 },
          { x: new Date(2017,6,26), y: 750 },
          { x: new Date(2017,6,26), y: 750 },
          { x: new Date(2017,6,26), y: 750 },
          { x: new Date(2017,6,26), y: 750 },
          { x: new Date(2017,6,26), y: 750 },
          { x: new Date(2017,6,27), y: 260 },
          { x: new Date(2017,6,28), y: 3000 },
          { x: new Date(2017,6,29), y: 300 },
          { x: new Date(2017,6,30), y: 290 },
          
        ]
      },
      {	
        type: "spline",
        markerSize: 1,
        showInLegend: true,
        dataPoints: [
         { x: new Date(2017,6,24), y: 391 },
         { x: new Date(2017,6,25), y: 370 },
         { x: new Date(2017,6,26), y: 200 },
         { x: new Date(2017,6,27), y: 2500 },
         { x: new Date(2017,6,28), y: 610 },
         { x: new Date(2017,6,29), y: 500 },
         { x: new Date(2017,6,30), y: 600 }
        ]
      }
      ]

    I want to show toolTip on specific date (current date in my case, i always have current date in my graph).

    #30672

    @saqib,

    You can use showAtX() method to show the toolTip over a specific dataPoint.

    ___________
    Indranil Deo
    Team CanvasJS

    #30683

    its Showing Error:

    core.js:6014 ERROR TypeError: chart.toolTip.showAtX is not a function

    showAtX() is not defined. i have tested in in stackblitz and its working but not in my Code.

    #30688

    @saqib,

    Can you kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with the sample data so that we can run it locally to understand your scenario better and help you out?

    ___________
    Indranil Deo
    Team CanvasJS

    #30699

    I am using it in my Angular Project. I downloaded CanvasJs Angular Example and it shows SAME Error even in your Angular Sample project.
    I am trying to make Working Example to share with you so you can track this bug.

    #30700

    Here is the sample project Based on your Angular Example.

    Github Repo

    #30703

    @saqib,

    You seem to be using older version of CanvasJS, v2.3.2. But showAtX method is available since v3.0, please refer this blog post for more information. We suggest you to try the same with v3.0 and let us know if you are still facing issue.

    ___________
    Indranil Deo
    Team CanvasJS

    #30705

    Thanks. Let me Take a look and try this if it works.

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

You must be logged in to reply to this topic.