|
tooltipRender: (args: IAccTooltipRenderEventArgs) => {
args.text = args.data.pointX;
}, |
|
document.getElementById('load').onclick = () => {
pie.annotations[0].content = "<div style='border: 2px solid red;color:white' id='chart_annotation'>"+ pie.series[0].dataSource[0].x +"</div>";
pie.refresh();
}; |
I have two charts side by side. They are in the vertical orientation with the data scrolling from the bottom to the top. When the mouse enters one chart, I need to programmatically show the tooltip in the other chart. Attached is a screenshot of my requirements.
What are the API functions to call to do this?
Hi Toni,
Greetings from Syncfusion.
When we hover on one chart, the tooltip appears on both the charts by using the chartMouseMove event of the chart. We have created a Javascript application to demonstrate the same. Please find the below stackblitz link for your reference.
Sample link: https://stackblitz.com/edit/8akjry?file=index.js
Code Snippet:
|
chartMouseMove: function(args) { if (args.target.indexOf('ChartAreaBorder') > -1) { var bounds = document.getElementById('charts1').getBoundingClientRect(); mousemoveEvent( document.getElementById('charts1'), args.x, bounds.y + (bounds.height/2), args.x, bounds.y + (bounds.height/2) ); } }, |
Screenshot:
Please let us know, if the above sample meets your requirement. Kindly, revert us if you have any concerns.
Regards,
Swetha