0

Determining axis sizing & coordinating plot alignment: proposal

Jonathan Shore 9 лет назад 0
I have a series of PlotModels (Views) where I want to align 1 axis.  For example I may have a series of plots aligned vertically with the same X axis, but with different Y axes.

A problem to solve is that the render-width of each of these Y axes may be different (and in fact may change as a given plot is panned).   I can set PlotMargins left to a fixed value, but this may clip the rendering for am axis.  The ActualPlotMargin property will not adjust to the natural sizing if the PlotMargin dimension is override.  Hence, I have a problem in adjusting the margins across panes in that if I adjust I cannot remeasure the natural sizing.

I would like to latch on to an event and interrogate the Y axis of each pane calling:
   axis.Measure(IRenderContext)
on each axis and adjust to the max extent across the set.

As the render context is private to the PlotView, do not have access to call the Measure method, unless the context is carried with an event.   How can I get access to this information?

Proposal
Perhaps it makes sense to have instead of Axis.Measure(rc) something like:  Axis.Update (IRenderContext) and have a public property like "ActualDimensions" on Axis which would be used for both internal axis sizing during the rendering cycle and for use in client applications.

Сервис поддержки клиентов работает на платформе UserEcho