ZedGraph AxisChange() 重置?

发布于 2024-09-13 20:56:16 字数 154 浏览 6 评论 0原文

我正在使用 C#。当我使用 AxisChange() 调整图表上的轴时,它工作正常,直到我进入图表窗格并手动放大和缩小。

手动放大和缩小后,AxisChange() 命令不再起作用。如何获得它以便在轴固定后,您可以再次使用 AxisChange() ?

I'm using C#. When I use AxisChange() to adjust the axis on my graph, it works fine, until I go into the graph pane and manually zoom in and out.

After manually zooming in and out, the AxisChange() command no longer works. How can you get it so after the axis gets fixed, you can again use AxisChange()?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

活泼老夫 2024-09-20 20:56:16

我检查了 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”子句之外尝试复制行...并看看会发生什么。不管怎样,尝试调试源代码,就足够理解了。

I've checked the code of AxisChange() method and I think this is because of following code:

            // 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 );
        }

I’m not sure though, you should give a try copy line … outside the “if” clause and see what happens. Any way, try to debug the source code, it is good enough for understanding.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文