Profile Picture

Customising various aspects of the Org Chart

Posted By Kevin Harrison 8 Years Ago
Author
Message
Kevin Harrison
Question Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 176, Visits: 1,865
Hi

I've been trying various methods which seem to have no effect, so please could you tell me how to change the following on the default Org Chart example:
1) Change the shapes from rectangles.
Changing Table in the line treeImporter.VertexShapesName = BasicShapes.Table.ToString(); results in nothing being drawn.
2) Remove the borders on the shapes, and/or change the border colours
3) Add arrowheads to the connecting lines.
4) How do I set a tooltip for each shape?
Thanks
Kevin


Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Kevin,

Regarding your questions about the Org Chart example:

1) This example requires using table shapes, because it shows an image and a text for each shape arranged in a tabular manner.

2) You can customize the style sheets used for the 2D shapes of the example by modifying the CreateStyleSheets method. More information about styles and style sheets is available in the documentation.

3) To customize the look of the connectors, you can create a style sheet for them and assign its name to the tree importer like this:

// Create style sheets for the edges
NStyleSheet edgeStyleSheet = new NStyleSheet("Edges");
NStyle.SetEndArrowheadStyle(edgeStyleSheet, new NArrowheadStyle(ArrowheadShape.Arrow, null,
    new NSizeL(6, 6), new NColorFillStyle(Color.White), new NStrokeStyle(Color.Black)));
document.StyleSheets.AddChild(edgeStyleSheet);

// Assign the style sheet name to the tree importer
treeImporter.EdgeStyleSheetName = edgeStyleSheet.Name;


4) You can assign a tooltip to each imported 2D shape in the event handler of the VertexImported event of the tree importer by assigning an interactivity style to the shape:

NStyle.SetInteractivityStyle(shape, new NInteractivityStyle("My Tooltip"));



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic