English 中文(简体)
如何在 RadChaart 中格式化数据点工具提示中的值?
原标题:How to format values within the data point tooltips in a RadChart?

我想将数字值的显示格式化为 ASP.NET Radchart 工具提示。例如,不要显示100000,而是将文字改为“1.0e5”。对于轴,要设定的属性如下:

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

图表序列中一定有类似属性, 类似工具提示的格式, 但到目前为止我还没有找到它。 有人知道吗?

最佳回答

对于图表中的每个图表系列项目,您可以按以下方式设置工具提示:

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

我不知道你们在使用哪个RadChart。 这是 ASP. Net MVC RadChart 的代码摘要 。

.Tooltip(tooltip => tooltip
    .Visible(true)
    .Format("{0:0.##E+0}")
)




相关问题
Discuss on Commercial Component libraries of silverlight

I am now looking forward to buy a component library of silverlight for increase the productivity. I find there are number of them. Telerik ComponentOne ComponentArt Infragistics Syncfusion I found ...

Telerik RadGrid: grid clientside pagination

I have a web service which returns me some data,I am massaging this data and using this as datasource for my radgrid (telerik). The datasource is quite large, and would like to paginate it. I found ...

Binding a radgrid to a tree like data structure

I have a structure that looks following Class TreeNode { public TreeNode Parent { get; } public IEnumerable<TreeNode> Children { get; } public . . . . } I want to bind this to a ...

IQueryable into a hierarchy

I currently have an IQueryable of Questions. In my Question object I have and "id" and a "parentId" which can be used to create a hierarchy. Currently, I bind a RadTreeView to the IQueryable of ...

Expand all items in RadGrid Hierarchy

I am using a RadGrid (2009 Q2) with a hierarchy. Is there a way in the client api to expand all rows and vice-versa? thanks! Update: I have written a javascript function based off the api ...

热门标签