设置x_axis的比例 [英] setting scale of x_axis
本文介绍了设置x_axis的比例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在表格上制作了一个图表.我想将x轴的比例设置为logrithim.我的意思是我在图表中添加了几个点.当显示图表时,我希望x_axis显示在对数刻度.该怎么办?
Hi,I have made a chart on my form.I want to set the scale of x axis as logrithim.I mean that I have several point added to my chart.When showing the chart,I want the x_axis be shown in logarithim scale.How can I do that?
推荐答案
以下是x轴上logrithm的示例代码
Here is the sample code for logrithm on x axis
Dim axisID As VtChAxisId
' Change both x and y axes to Logarithmic scale for 2D
' Line chart.
MSChart1.chartType = VtChChartType2dLine
For axisID = VtChAxisIdX To VtChAxisIdY
With MSChart1.Plot.Axis(axisID).AxisScale
.Type = VtChScaleTypeLogarithmic
.LogBase = 10
End With
Next
我使用了以下代码:
I used the code:
mychart.AxisX.IsLogarithmic = true;
这篇关于设置x_axis的比例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文