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?

有帮助吗?

解决方案

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);

其他提示

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}")
)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top