Inhalt:
- Daten- / Objektstruktur
- Füllen von Daten
- Chartkonfiguration
Konfiguration XdevOrgChartProperties
Anchor | ||||
---|---|---|---|---|
|
Kategorie / Beschriftung | Eltern Kategorie | Tooltip |
---|---|---|
"Company" | "" | "Company" |
"QA" | "Company" | "QA" |
"Marketing" | "Company" | "Marketing" |
"Employee 1" | "Marketing" | "Employee 1" |
"Employee 2" | "Marketing" | "Employee 2" |
Optimale Objektstruktur (Java)
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
public class BubbleChartObject { private String name; private String root; private String tooltip; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getRoot() { return root; } public void setRoot(String root) { this.root = root; } public String getTooltip() { return tooltip; } public void setTooltip(String tooltip) { this.tooltip = tooltip; } } |
Anchor | ||||
---|---|---|---|---|
|
Beispiel: Füllen der Daten
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
XdevOrgChartModelfinal ChartModel model = new XdevOrgChartModel( ChartModel.New() .addColumn(Column.New(Type.STRING, "caption", "Caption")) .addColumn(Column.New(Type.STRING, "parent", "Parent")) .addColumn(Column.New(Type.STRING, "tooltip", "Tooltip")); model.addItemaddRow("Company", "", ""); model.addItemaddRow("QA", "Company", "QA"); model.addItemaddRow("Sales", "Company", "Sales"); model.addItemaddRow("Marketing", "Company", "Marketing"); model.addItemaddRow("Developement", "Company", "Developement"); model.addItemaddRow("Production", "Company", "Production"); model.addItemaddRow("Employee 1", "QA", "Employee"); model.addItemaddRow("Employee 2", "QA", "Employee"); model.addItemaddRow("Employee 3", "QA", "Employee"); model.addItemaddRow("Employee 4", "Sales", "Employee"); model.addItemaddRow("Employee 5", "Sales", "Employee"); model.addItemaddRow("Employee 6", "Sales", "Employee"); model.addItemaddRow("Employee 7", "Sales", "Employee"); model.addItemaddRow("Employee 8", "Marketing", "Employee"); model.addItemaddRow("Employee 9", "Developement", "Employee"); model.addItemaddRow("Employee 10", "Developement", "Employee"); model.addItemaddRow("Employee 11", "Production", "Employee"); model.addItemaddRow("Employee 12", "Production", "Employee"); orgChart.setModel(model); |
Anchor | ||||
---|---|---|---|---|
|
API und Methoden:
Füllen der Daten
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
model.addItem("QA", "Company", "QA");
//Parameter 1 ("QA"): Name und Beschriftung des Elements
//Parameter 2 ("Company"): Eltern Element
//Parameter 3 ("QA"): Tooltip des Elements |
...
language | java |
---|---|
theme | Eclipse |
firstline | 1 |
linenumbers | true |
...
Properties | ||
---|---|---|
API Key | For some charts a API Key from Goofle is nessesary. You can get a key here: https://developers.google.com/maps/documentation/javascript/get-api-key
| |
MapType | The type of map to show. Possible values are 'normal', 'terrain', 'satellite', 'hybrid', or the ID of a custom map type, if any were created.
| |
ShowInfoWindow | If set to true, shows the location description in a separate window when a point marker is selected by the user.
|