Change the tool tip label format to d/M/y but the x axis stay as MMM

Hello, 

Can tooltipformat help to change the labelformat in the tool tip? I want the x axis stay as monthly while the tooltip will show the exact date of the particular data.

Thank you.

1 Reply 1 reply marked as answer

SM Srihari Muthukaruppan Syncfusion Team May 19, 2021 12:38 PM UTC

Hi Zydenhx, 
 
Based on your requirement. We would like to let you know that there are no direct support to customize tooltip alone. Hence we suggest you to use tooltipRender event to customize the tooltip text based on our requirement. Please find the sample, code snippet and screenshot below. 
 
 
Code Snippet: 
<ChartComponent tooltipRender={this.tooltipRender.bind(this)}  loaded={this.onChartLoad.bind(this)} > 
 
// add your additional code here 
 
tooltipRender(args) { 
    var y = args.text.split(':')[1]; 
    args.text = args.data.pointX + ' : ' + y; 
  } 
 
// add your additional code here 
 
Screenshot: 
 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M 


Marked as answer
Loader.
Up arrow icon