简体   繁体   English

是否可以以十六进制显示DataVisualization.Charting.Chart的x轴值?

[英]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.

相关问题 Xaml,System.Windows.Controls.DataVisualization.Charting-将X轴标签显示为秒而不是时间? - Xaml, System.Windows.Controls.DataVisualization.Charting - Display X-Axis label as seconds instead of Time? DataVisualization.Charting.Chart PostPaint事件过早触发 - DataVisualization.Charting.Chart PostPaint Event Firing Prematurely 如何在不写入文件的情况下将DataVisualization.Charting.Chart的图像获取到iTextSharp.text.Image? - How may I get the image of DataVisualization.Charting.Chart to iTextSharp.text.Image without writing to a file? .NET图表 - 通过拖动X轴缩放图表 - .NET Charting - Zooming a chart by dragging the X-Axis 用工作日标记 System.Windows.Forms.DataVisualization.Charting 图表中的 X 轴 - label the X axis in a System.Windows.Forms.DataVisualization.Charting chart with weekdays 调整图表大小后如何为datavisualization.charting调整轴刻度? - How to adjust axis scales for datavisualization.charting after resizing a chart? DataVisualization.Chart,如何使X轴间隔更大? - DataVisualization.Chart, how can I make the X-axis interval larger? 在C#2008中,如何在图表上将TimeSpan值显示为X轴? - How can I display TimeSpan values as the X-axis on a chart in C# 2008? 如何在Winforms的Chart控件中修剪X轴上的x值? - How to trim the values of x on X-axis in Chart control in Winforms? 无法为 Powerpoint 折线图的 X 轴选择值 - Unable to select Values for X-axis of a Powerpoint line chart
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM