Tooltip position on charts

Hi, we have a Bar chart in small format. Sometimes we have a big text in the tooltip and it fits to all the available space. It could  be possible to configure the chart to show an ellipsis in this case on the same way that happens in the axis labels?


imagen

We noticed that hte tooltip has the property header but we don't know how to trim the text or made the ellipsis appear.

imagen


Thank you in advance for your answer and regards

Gaspar



4 Replies

DG Durga Gopalakrishnan Syncfusion Team May 20, 2022 02:10 PM UTC

Hi Gaspar,


Greetings from Syncfusion.


As of now, we don’t have support to trim the tooltip text. We suggest you to enableTextWrap property to wrap the tooltip text when its width is large and there is available space to display the tooltip. We have prepared sample based on your requirement. Please check with below snippet and sample.


  tooltip: {

            enable: true,

            enableTextWrap: true,

            header:'UK Trade in Food Groups - 2015',

            format:'${point.x} : ${point.y}'

         }



Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Bartooltip2061876049.zip


API : https://ej2.syncfusion.com/vue/documentation/api/chart/tooltipSettingsModel/#enabletextwrap


Kindly revert us if you have any concerns.


Regards,

Durga Gopalakrishnan.



GB Gaspar Blein May 23, 2022 10:52 AM UTC

Hi  Durga, 


We tried with your examble but we see that the text in te tooltip appears without wrap. 

We modified your example to have wider text and setting the axis properties enableTrim and maximumLabelWidth to show the ellipsis in the axis and maintained the tooltip property enabledTextWrap to wrap the text into the toltip if neccesary nut we don't see any effect when the tooltip is shown.


I attached a video and the code example  we used


Regards


Gaspar



Attachment: sampleTextWrap_ae06bc16.zip


SB Swetha Babu Syncfusion Team May 24, 2022 10:36 AM UTC

Hi Gaspar,


We have considered the reported scenario as a bug and logged a defect report for the same. The fix for the reported scenario will be included in our weekly patch release which is expected to be rolled out on 7th June, 2022. Please find the below feedback link for your reference.


Feedback link: https://www.syncfusion.com/feedback/35137/tooltip-content-is-not-proper


If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.


Regards,

Swetha



DG Durga Gopalakrishnan Syncfusion Team June 8, 2022 11:45 AM UTC

Hi Gaspar,


Thanks for being patience. As of now, we don’t have support to wrap the tooltip text. We have wrap support only for header text, so we request you to use tooltipRender event to display text in multiple lines by passing array of texts collection to args.text. Please check with the below snippet and sample.


<ejs-chart :tooltipRender='tooltipRender'> </ejs-chart>

 

methods:{

    tooltipRender: function(args) {

      args.text = args.text.split(":");

    }

  }



Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/SplitText-1825333026.zip


Kindly revert us if you have any concerns.


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon