Project Description
OpenWPFChart library goal is to provide the component model along with base components to assemble Chart controls. Parts set is extensible so the developer can add its own new components. Chart controls composed from the these parts could have different look and feel.

Rationale

Chart controls design is a rather complex task. Companies and individuals propose wide spectrum of Chart controls, both open source and proprietary. Problem is that it’s practically unreal to design the Chart control or control suite satisfying various users needs and preferences (and even foresee them). At the first place the problem arises from:
  • Chart elements set – functions graphs, scattered point clouds, colored areas between curves, diagrams, coordinate grids and axes, legends, labels, sorts of markers, etc.
  • Control visual look.
  • The way these elements are positioned at or around the Chart area; e.g. coordinate axes, legends and labels might be placed either inside the Chart area or along its borders or somewhere else.
The problem becomes even worst if a Chart control should provide editing capabilities of the data displayed.
As a result we see more and more new Chart controls written from the scratch.

General

OpenWPFChart library provides the extensible set of Windows Presentation Foundation elements to enable a developer to assemble different Chart controls fit exactly her/his needs and preferences. It provides the developer with the opportunity do not start its Chart development from the ground. Instead, she or he build its Chart from the parts provided either by OpenWPFChart library or by third party parts developed on OpenWPFChart library model. That parts are then composed into the Chart by means of WPF wonderful composition capabilities.

Solution

Usually a Chart behave as a collection of visual elements which can support or not support the notion of "selected element(s)". So, basically, a Chart control could derive either from ItemsControl or from one of its derivatives: Selector, ListBox, etc. Since data presentation visual Chart items should share common Chart Area screen space, we could use Canvas (or like) as ItemsPanel to position that visuals in ItemsControl. Farther, we could place required decorative or functional elements like axes, grids, legends, labels, etc in the ItemsControl template.

We could develop a set of elements (Visuals, FrameworkElements):
  • Data presentation visual elements: function curves, scattered points clouds, etc.
  • Coordinate grids.
  • Coordinate axes.

With these elements at hands we could compose a Chart as follows:
  1. Data presentation visual elements (Chart items) are displayed as the ItemsControl items. We place grids into the ItemsControl template. If required, we could also place here the coordinate axes (if they should be alongside at the chart items). That ItemsControl forms "the Chart Area".
  2. Chart Area outskirts are decorated with coordinate axes, legends, labels, etc.

To manage all the things above we don't even required to create the Chart control, we could compose all the parts directly in the application window. Note, however, that the window XAML in such a case becomes rather unwieldy, so this approach isn’t practical; it’s better to create one or more Chart controls (either Custom Controls or User Controls) with the look and feel required.

One part of OpenWPFChart library is the object model of Chart components (Chart Parts) along with the basic set of these parts. Another part is the set of Chart Controls composed from the parts above.

See more

Chart Parts
Chart Parts Composition
Chart Controls
Gallery

Last edited May 9, 2009 at 7:58 AM by ovp, version 11