!!!###!!!title=30-How to add prompt information to the legend——VisActor/VChart FAQ documents!!!###!!!

How to add prompt information to the legend?

Problem Description

As shown in the picture below, the text of the legend has been omitted. I want to add prompt information to them and display the complete text. How to do this?

solution

Different chart library solutions have different solutions. VChart supports complete text display with omitted text by default, and you only need to hover to display it.

Of course, you can also create your own tooltip component by listening to legend-related events. For details, please refer to this example: [Link](https://codesandbox.io/s/vchart-legend-custom-interaction-8qsx5z?file=/ src/index.ts)

Result display