Showing results for 
Search instead for 
Did you mean: 
Community Team Member
Community Team Member


This article will demonstrate how to change the category name displayed in the tooltip for a specific series. In my example, we have a simple line chart that displays the current year's sales per month, along with the values from the past year.
When we hover over the tooltip for the 'past year' series, the category displayed will be the month from the current year. We want to show the previous year's value in the tooltip.


I used the following script to accomplish this. Its also attached to this post.
In your situation, you would want to modify the variable 'seriesName' to be the name of the series in your widget.
widget.on("beforedatapointtooltip", function (se, args){
 seriesName="Past Year Total OrderQty";
 if ({
  newYear= parseInt(args.context.category.slice(-4)) - 1;
  args.context.category = args.context.category.slice(0,-4)+newYear
More information on how to edit a widget's script can be found here: Sisense Javascript API & Add-ons
Version history
Last update:
‎03-02-2023 09:06 AM
Updated by:
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: