我使用的是C#。当我使用AxisChange()调整我的图形上的轴时,它工作得很好,直到我进入图形窗格并手动放大和缩小。
手动放大和缩小后,AxisChange()命令将不再起作用。如何才能在轴固定之后,再次使用AxisChange()
发布于 2010-08-10 21:48:10
我检查了AxisChange()方法的代码,我认为这是因为以下代码:
// if the ChartRect is not yet determined, then pick a scale based on a default ChartRect
// size (using 75% of Rect -- code is in Axis.CalcMaxLabels() )
// With the scale picked, call CalcChartRect() so calculate a real ChartRect
// then let the scales re-calculate to make sure that the assumption was ok
if ( _chart._isRectAuto )
{
PickScale( g, scaleFactor );
_chart._rect = CalcChartRect( g );
//this.pieRect = PieItem.CalcPieRect( g, this, scaleFactor, this.chartRect );
}我不确定,你应该给一个尝试复制行…在“if”子句之外,看看会发生什么。无论如何,试着调试源代码,它已经足够好理解了。
https://stackoverflow.com/questions/3449478
复制相似问题