You must be logged in to post your query.
Home › Forums › Chart Support › Prefix to Axis X value in tooltip
Tagged: tooltip issue
Please, I need to add a prefix to the Axis X value in a shared tooltip. As you can see in https://i.ibb.co/sWd52vG/Captura-de-tela-2021-05-04-153259.png the legend show the prefix “Simulado” but not in the tooltip. Thank you
@hardworkmedicina,
You can use the toolTipContent property to customize the content of the toolTip and add a prefix to the x-value as shown in the code snippet below,
toolTipContent: " Simulando {x} <br/> <span style='\"'color: {color};'\"'>{name}:</span> {y}",
Kindly take a look at this JSFiddle for an example on customizing the toolTip content using toolTipContent property.
— Adithya Menon Team CanvasJS
Thank you @adithya-menon! It worked!
You must be logged in to reply to this topic. Login/Register