[英]Is it possible to display the x-axis values of the DataVisualization.Charting.Chart in hexadecimal?
Recently started using the Chart control included in .NET 4 in the DataVisualization.Charting namespace. 最近开始在DataVisualization.Charting命名空间中使用.NET 4中包含的Chart控件。 I am working on a project where a delay value used in an FPGA is displayed on the x-axis of a line chart during calibrations.
我正在一个项目中,在校准期间,折线图中的x轴上显示了FPGA中使用的延迟值。 The value is used elsewhere as a hexadecimal value.
该值在其他地方用作十六进制值。
Was wondering if there is a way to display the x-axis labels in hexadecimal format. 想知道是否存在一种以十六进制格式显示x轴标签的方法。 It's not vital as can simply convert values following runs with relative ease, but would certainly be an enhancement.
它并不重要,因为可以简单地在运行后相对简单地转换值,但是肯定会有所增强。 Any help greatly appreciated.
任何帮助,不胜感激。
The LabelStyle
of the Axis
objects have a Format
property, so you can use any of the standard C# formatting strings. Axis
对象的LabelStyle
具有Format
属性,因此可以使用任何标准C#格式字符串。 You can thus set 您可以这样设定
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "X4";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.