I have an XY chart with data coming in as long decimals, and have the Y axis format string set to #,###.00
to (hopefully) achieve two decimal place rounding. This works for the axis labels themselves, but when I over over datapoints, they aren’t rounded. The tooltips are set to have the default text of {name}: [bold]{valueY}[/]
. Is there something I need to do to the tooltip text property to make it round like the axis?
Setting the tooltip text to something like
{name}: [bold]{valueY.formatNumber('#,###.00')}[/]
Should get you two decimal place rounding. Further information on how formatting works for these text inputs can be found here https://www.amcharts.com/docs/v4/concepts/formatters/formatting-strings/
It seems like the series’ tooltip isn’t respecting the text
property at all for me. I can even change it to something like “TEST” and it shows up based on the series’ label
text property instead. Could this be a bug?
Depending on the way that your XY chart is set up, the location of the tooltip settings will change.
If your series rendermode is set to column then it will use the tooltip under props.series[x].tooltip.text
but if your series rendermode is set to line then it will use the tooltip object under props.series[x].line.appearance.bullets[x].tooltip.text
. As for it only displaying the series[x].label.text
property, this is most likely due to your tooltip text being set to {name}
.
If you are still having trouble or it won’t change no matter what, I wouldn’t mind taking a look at your chart. You can copy it and paste it into a text editor and either send it via this forum thread or as a private message.
Oh okay, that did it! My chart is a line chart and I didn’t realize that’s where the tooltip settings for line charts are.
Thanks!
Awesome, yeah we are currently in the process of only showing relevant properties for components like this which should help with stuff like this in the future.
Great, can’t wait for that. That will really really help with these tons of options that frankly get a little confusing to dig through.
Thanks again!