Pergunta

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?

Foi útil?

Solução

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

Outras dicas

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}")
)
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top