How to set X axis is logarithmic
-
Monday, June 15, 2009 8:33 AMWhen I set the X axis IsLogarithmic is true,there will come a error,it say Chart Area Axex--A logarithmic scale cannot be use for this axis.If I want X axis is logarithmic ,how to do it ?thanks for you help
All Replies
-
Monday, June 15, 2009 3:07 PMOwner
This exception is raised if you do not provide X xalues for the data points or Series.IsXValueIndexed is set tot True. In both scenariou logarithmic scale is not supported.
Alex.
http://blogs.msdn.com/alexgor- Proposed As Answer by Alex GorevMicrosoft Employee, Owner Monday, June 15, 2009 3:07 PM
- Marked As Answer by daojun zhang Tuesday, June 16, 2009 12:23 AM
-
Wednesday, September 01, 2010 12:21 PM
你应该也是中国人吧。。。我也遇到了相似的问题,在代码中合适位置加入2句话应该就好了:
chart1.ChartAreas["ChartArea1"].AxisX.IsLogarithmic = true;
chart1.ChartAreas["ChartArea1"].AxisX.IsStartedFromZero = false;//大部分错误可能就是因为没加这句话为了好看起见,可以再加入适当的间隔,比如:
chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.Interval = 5;
chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1;- Proposed As Answer by aaqqxx1910 Wednesday, September 01, 2010 12:22 PM

