0

Series Axis

Mark Bean hace 8 años actualizado hace 8 años 1

After removing and then adding a new series to the model, is there a method or way to force axes to update to reflect the new series' data? At the moment it seems they still reflect the original series' data. Perhaps we missed an essential call?

Rephrasing. We want to label peaks on a Series but avoid having overlapping labels. We need to access Axes so we can calculate text and arrow annotation positions. If we use the PlotModel.Updating event as the trigger for this calculation, the Axes exist but have values of 0; true values are only available later (for example, if we move the mouse over the plot). If we use the PlotModel.Updated event, and add Annotations, the Axes for our added Annotations will be null (EnsureAxes() is only called during Paint / Render).

We see two solutions: force the Axes' min and max values in the initial Updating event to be the real ones, OR, is there a method we can call to force the Axes to update to reflect the new series, before the plotModel is rendered.