1. A method for creating and laying out a graphic within an application program, comprising: receiving a data model for constructing the graphic, the data model defining a set of data and data relationships to be represented in the graphic; receiving a graphic definition, the graphic definition describing the mapping of the data from the data model to layout nodes in a layout tree, wherein each layout node represents one or more shapes in the graphic; determining shape properties for each shape in the graphic based at least in part on the graphic definition by utilizing one or more algorithms, wherein the one or more algorithms are based at least in part on an ordered set of two or more constraint rules, and wherein the shape properties comprise at least a shape size and a shape position for each shape in the graphic; automatically modifying the graphic to fit in a layout space of a display by evaluating each constraint rule in succession and modifying a corresponding constraint value of at least one shape property until it is determined that the graphic fits in the layout space; creating a shape list comprising the one or more shapes and the shape properties based on the one or more algorithms; and providing the shape list to the application program for rendering the graphic.