私はC#を使用しています。グラフの軸を調整するために使用する場合AxisChange()
、グラフペインに移動して手動でズームインおよびズームアウトするまで、正常に機能します。
手動でズームインおよびズームアウトした後、AxisChange()
コマンドは機能しなくなります。軸が固定された後、再び使用できるようにするにはどうすればよいAxisChange()
ですか?
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」句の外側にtry copy行を指定して、何が起こるかを確認する必要があります。とにかく、ソースコードをデバッグしてみてください。理解するには十分です。