Inhalt:
Optimale Datenstruktur (Datenbank):
Kategorie | Y-Achse | X-Achse |
---|---|---|
Beverages | 2017 | 550 |
Beverages | 2018 | 540 |
Condiments | 2017 | 350 |
... |
Beispiel füllen der Daten:
final ChartModel model = ChartModel.New() .addColumn(Column.New(Type.STRING, "year", "Jahr")) .addColumn(Column.New(Type.NUMBER, "bolivia", "Bolivia")) .addColumn(Column.New(Type.NUMBER, "ecuador", "Ecuador")) .addColumn(Column.New(Type.NUMBER, "madagascar", "Madagascar")) .addColumn(Column.New(Type.NUMBER, "papua New Guinea", "Papua New Guinea")) .addColumn(Column.New(Type.NUMBER, "rwanda", "Rwanda")) .addColumn(Column.New(Type.NUMBER, "average", "Average")); model.addRow("2004/05", 165, 938, 522, 998, 450, 614.6); model.addRow("2005/06", 135, 1120, 599, 1268, 288, 682); model.addRow("2006/07", 157, 1167, 587, 807, 397, 623); model.addRow("2007/08", 139, 1110, 615, 968, 215, 609.4); model.addRow("2008/09", 136, 691, 629, 1026, 366, 569.6); //Setzen des Models comboChart.setModel(model);
API und Methoden:
Properties | ||
---|---|---|
Series Configuration | The shape of individual data elements: 'circle', 'triangle', 'square', 'diamond', 'star', or 'polygon'.
For detailed informations see: https://developers.google.com/chart/interactive/docs/points |