Question

I want to format the display of numeric values in an ASP.NET RadChart's tooltips. For example, instead of showing 100000, I want the text to read "1.0e5". For the axes, the property to set is as follows:

chart.InnerChart.PlotArea.YAxis.Appearance.CustomFormat = "0.##E+0";

There must be a similar property on the chartSeries to similarly format the tooltips, but so far I have failed to locate it. Does anyone know?

Was it helpful?

Solution

For each ChartSeriesItem in the chart, you can set the ToolTip in the following manner:

e.SeriesItem.ActiveRegion.Tooltip = string.Format("{0:0.###e+0}", value);

OTHER TIPS

I'm not sure which RadChart you are using. Here is an excerpt of code for an ASP.Net MVC RadChart.

.Tooltip(tooltip => tooltip
    .Visible(true)
    .Format("{0:0.##E+0}")
)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top