Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Inhalt:

Anchor
Data
Data
Optimale Datenstruktur (Datenbank):

KategorieY-AchseX-Achse
Beverages2017

550

Beverages2018540
Condiments2017350
...

Optimale Objektstruktur (Java):

Code Block
languagejava
themeEclipse
firstline1
linenumberstrue
public class ComboChartObject {

	private String yvalue;
	private String category;
	private Integer xvalue;

	public String getYvalue() {
		return this.yvalue;
	}

	public void setYvalue(final String yvalue) {
		this.yvalue = yvalue;
	}

	public String getCategory() {
		return this.category;
	}

	public void setCategory(final String category) {
		this.category = category;
	}

	public Integer getXvalue() {
		return this.xvalue;
	}

	public void setXvalue(final Integer xvalue) {
		this.xvalue = xvalue;
	}
}

Anchor
Fill
Fill
Beispiel füllen der Daten:

Code Block
languagejava
themeEclipse
firstline1
linenumberstrue
//Erstellen Model und hinzufügen der Kategorien
final XdevComboChartModel model = new XdevComboChartModel();
model.addCategory("2017");
model.addCategory("2018");
 
//Füllen der Items
model.addItem("Beverages", "2017", 560);
model.addItem("Beverages", "2018", 560);
 
model.addItem("Condiments", "2017", 530);
model.addItem("Condiments", "2018", 530);
 
//Setzen des Models
comboChart.setModel(model);

API und Methoden:

Füllen und Definieren der Kategorien

...