Versions Compared

Key

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

Beispiel konfigurieren der Beschriftungen / Legenden / Farben

Code Block
languagejava
themeEclipse
firstline1
linenumberstrue
//Erstellen einer Konfiguration für das Chart
XdevBarChartConfig config = new XdevBarChartConfig();

//Definieren eines Backgroundstyles
final BackgroundStyle style = new BackgroundStyle();
style.setFill("white");
style.setStroke("black");
style.setStrokeWidth(10);

//Definieren eines Texstyles
final TextStyle textStyle = new TextStyle();
textStyle.setBold(true);
textStyle.setFontName("Arial");
textStyle.setFontSize(12);
textStyle.setItalic(true);
textStyle.setColor("Red"); oder textStyle.setColor("#FFFFFF");

//Definieren eines Legendenstyles
LegendOptions legendOptions = new LegendOptions();
legendOptions.setTextStyle(textStyle);
legendOptions.setPosition(XdevChartOptions.POSITION_BOTTOM);
legendOptions.setMaxLines(5);
legendOptions.setAlignment(XdevChartOptions.ALIGNMENT_CENTER);

//Zuweisen der Konfiguration für Beschriftungen
config.setBackgroundColor(style);
config.setTitleTextStyle(textStyle);
config.setLegend(legendOptions);

...