CRMondrian

CRMondrian is a simle API to buildPolymetric Views. github

It is simmilar to {{gtClass:GtMondrian}} but with some key differences: - Easier to choose the shape of the nodes - Support for normalized nodes - Offers methods for easily creating a ClassBlueprint and MindMap - Add actions and many more ## How does it work? A CRMondrian consists of theses main parts: - {{gtClass:CRCanvas}}: The canvas is parent to all elements contained in the visualization. - {{gtClass:CRShapeBuilder}} : There are different shapeBuilders for different node shapes. Their job is to collect the shape specification and when required build the nodes. (a mondrian instance can have multiple shapeBuilders) - {{gtClass:CRNode}}: CRNode wraps the node shape in a element that changes the color to add highlights to the node when needed. Furthermore is it the element that addes drag functionallity and tooltips to the node. - {{gtClass:CREdgeBuilder}} together with {{gtClass:CREdge}} and its subclasses: Provides the ability to add edges to the visualization. (a mondrian instance can have mulitple edgeBuilders) - CRLayout: The diffent layouts are used to layout the nodes. They are applied on the canvas. ## How do I use it? Following some basic examples on how to use CRMondrian. You can find many more examples in {{gtClass:CRMondrianExamples}} ### Create Nodes: Create simple collection of nodes like this: {{gtExample:CRMondrianExamples>>#someNumbers|codeExpanded=true|previewExpanded=true}} Change the shape to the following predefined shapes: - Circle - Box - Point - Label {{gtExample:CRMondrianExamples>>#someCircles|codeExpanded=true|previewExpanded=false}} Or define your own shape like this: {{gtExample:CRMondrianExamples>>#customShape|codeExpanded=true|previewExpanded=false}} ### Edges and Layout Add edges and a layout like this: {{gtExample:CRMondrianExamples>>#someConnectedPointsTree|codeExpanded=true|previewExpanded=false}} ### Normalizer Add a normalizer like this: {{gtExample:CRMondrianExamples>>#normalizeColor|codeExpanded=true|previewExpanded=false}} ### Actions Add a action (Eventhandler) to each node like this: {{gtExample:CRMondrianExamples>>#customAction|codeExpanded=true|previewExpanded=false}} ### Nested nodes {{gtExample:CRMondrianExamples>>#mondrianAsNode|codeExpanded=true|previewExpanded=false}}