使用对数刻度在MS图表控制 [英] using logarithmic scale in Ms chart control
问题描述
我试着去创建一个图表已经与一系列的X轴的基数为10对数刻度从1到1000我似乎能够创建在设计时的轴,但每当加载的形式我得到一个错误信息说:图表区轴 - 对数刻度无法用于此轴
Im trying to create a chart the has a base 10 logarithmic scale for the x axis with a range from 1 to 1000. I seem to be able create the axis during design time but whenever the form is loaded I get an error message saying "Chart Area Axes - A logarithmic scale cannot be used for this axis.
这是上MSChart控件的限制?为什么我不能够在X轴创建一个日志规模有多大?
Is this a limitation on the MSChart control? why am I not able to create a log scale on the X Axis?
推荐答案
我建议使用燮pressExceptions特性,它允许忽略一些例外,也是一个在轴用零连接与对数刻度。我觉得这是这种情况,而不是操纵数据的最佳解决方案。
I propose to use SuppressExceptions property which allows to ignore some exceptions, also that one connected with zeros in axis with logarithmic scale. I think this is the best solution for that situation instead manipulating data.
chart.SuppressExceptions = true;
这篇关于使用对数刻度在MS图表控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!