Feature Request: Pre-render Validation for Pathological Chart Configurations

Charts for WPF Forum

The latest build of this product (v25.1.4) was released 5 months ago, which was before this thread was created.
Posted 1 month ago by bcs99
Avatar

While building a WPF chart editor using the Actipro XYChart controls, I ran into a scenario where a perfectly valid chart configuration caused the application to appear hung.

For example, it is easy for a user to accidentally configure a DateTimeAxis with a very small interval (such as 1 millisecond) over a large date range. The chart then attempts to generate an enormous number of intervals during rendering. The application doesn't crash—it simply spends a very long time rendering, making it appear unresponsive.

To prevent this in my editor, I added a pre-render validation step that estimates the number of intervals (or categories) that will be generated based on the current axis configuration and data range. If the estimate exceeds a configurable threshold, I skip the render and display a message explaining why, along with suggestions such as increasing the interval or narrowing the visible range.

It would be helpful if the charting library exposed something similar. For example:

  • Configurable limits such as a maximum number of generated intervals or categories.

  • A validation API that estimates render complexity before rendering begins.

  • A cancellable "pre-render" event that allows an application to inspect the pending render and cancel it if it exceeds acceptable limits.

I realize this situation is uncommon for applications with fixed chart configurations, but it is very easy to encounter when building an interactive chart editor where users are experimenting with axis settings. Having a built-in mechanism to detect pathological rendering scenarios would improve the developer experience and help prevent applications from appearing hung due to an accidental configuration.

For your consideration,

Bob

Comments (1)

Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thanks for the idea. I can see how a pre‑render check might help in certain edge cases, especially with more complex chart setups. In most scenarios, chart configuration options aren't exposed to end users, so situations like this tend to be rare. There's also a subjective element to deciding what should be flagged. I've logged the suggestion so we can revisit it down the road. We appreciate you taking the time to share the feedback.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.