...
Optimale Datenstruktur (Datenbank):
...
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
firstline | 1 |
---|
linenumbers | true |
---|
|
XdevCandleStickModelfinal ChartModel model = new XdevCandleStickModelChartModel.New();
model.addItem("Mon", 5, 10, 7, 8);
model.addItem("Tue", 5, 10, 8, 7);
model.addItem("Wen", 6, 12, 7, 11);
model.addItem("Thu", 7, 13, 11, 9);
model.addItem("Fri", 7, 13, 9, 13); |
API und Methoden:
Füllen der Daten
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
firstline | 1 |
---|
linenumbers | true |
---|
|
model.addItem
.addColumn(Column.New(Type.STRING, "caption", "Caption"))
.addColumn(Column.New(Type.NUMBER, "min value", "Lunte"))
.addColumn(Column.New(Type.NUMBER, "max value", "Docht"))
.addColumn(Column.New(Type.NUMBER, "open value", "Eröffnung"))
.addColumn(Column.New(Type.NUMBER, "close value", "Schluss"));
model.addRow("Mon", 5, 10, 7, 8);
//Parameter 1 model.addRow("Mon"): Beschriftung / Caption
//Parameter 2 (5): Min Value / Lunte
//Parameter 3 (10): Max Value / Docht
//Parameter 4 (7): Open Value / Eröffnung
//Parameter 5 (8): Close Value / Schluss |
...
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
firstline | 1 |
---|
linenumbers | true |
---|
|
XdevCandleStickChartConfig config = new XdevCandleStickChartConfig();
final ChartArea area = new ChartArea();
area.setHeigth("100"); //Höhe des Chart
area.setWidth("100"); //Breite des Chart
area.setLeft("100"); //Abstand des Chart von Links in Pixel
area.setRight("100"); //Abstand des Chart von Links in Pixel
area.setTop("100"); //Abstand des Chart von Links in Pixel
config.setChartArea(area); |
...
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
firstline | 1 |
---|
linenumbers | true |
---|
|
XdevCandleStickChartConfig config = new XdevCandleStickChartConfig();
config.setBackgroundColor(...); //Siehe API Allgemein "BackgroundStyle"
//Eine Liste an Farben die dann der Reihe nach an die Kategorien vergeben werden
List<String> places = Arrays.asList("#FFFFFF", "Red", "#F4g6uz");
config.setColors(places); //Zuweisen der Farbliste |
...
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
firstline | 1 |
---|
linenumbers | true |
---|
|
XdevCandleStickChartConfig config = new XdevCandleStickChartConfig();
config.setLegend(...); //Siehe API Allgemein "LegendOptions"
config.setTitleTextStyle(...); //Siehe API Allgemein "TextStyle"
config.setFontName(""); //Wahl der Schriftart (Schriftart muss vom Browser unterstützt werden)
config.setFontSize(15); //Setzen allgemeine Schriftgröße im Chart
config.setTitle("Sales Overview"); //Setzen ChartTitel |
...
Tue", 5, 10, 8, 7);
model.addRow("Wen", 6, 12, 7, 11);
model.addRow("Thu", 7, 13, 11, 9);
model.addRow("Fri", 7, 13, 9, 13);
this.candlestickChart.setModel(model); |
API und Methoden:
Properties |
|
---|
Orientation | The orientation of the chart. When set to'vertical' , rotates the axes of the chart so that (for instance) a column chart becomes a bar chart, and an area chart grows rightward instead of up: |
...
candlestick.setOrientation(Orientation.VERTICAL); |
|