0

I am using Jquery Sparkline plugin to draw line graphs on my website, it's working fine but I want to edit its tooltip. I read whole tooltip documentation available in their official website but no positive results.

Here is my code:

$(".sparkline").each(function () {
    var $this = $(this);
    $this.sparkline('html', $this.data(), {
        type: "line",
        tooltipSuffix: " Tweets : "
    });
});

I am plotting No of tweets vs Hour graph, so I just want to display "x Tweets at y Hrs", can anyone help me out with that..?

urbz
  • 2,663
  • 1
  • 19
  • 29
void
  • 36,090
  • 8
  • 62
  • 107
  • create a [jsfiddle](http://jsfiddle.net/) and include all resources in the External Resources tab on the left – Last1Here Jun 13 '14 at 10:10

1 Answers1

0

I think the documentation you need can be found here: http://omnipotent.net/jquery.sparkline/#tooltips

You can probably use the tooltipFormat to state something like:

tooltipFormat: '{{x}} Tweets at {{y}} hrs',