Properties general

Contents:

  • Properties

  • Colors

All Properties listed below are available in the GUI-Builder at Properties. In addition, these can in principle also be set directly by code. For some of them this is recommended due to their complexity.

Property

ChartWidth

Width of the diagram, in pixels.

chart.setWidth("1000");
java

ChartHeight

Height of the diagram, in pixels.

chart.setHeight("800");
java

EnableInteractivity

Whether the chart fires user-based events or responds to user interactions. If false, the chart does not trigger select or other interaction-based events (but it does trigger ready or error events) and does not display hover text or otherwise change in response to user input.

chart.setEnableInteractivity(true);
java

FontName

The default font for all text in the chart. You can override this using properties for specific chart elements.

chart.setFontName("TimesNeewRoman");
java

FontSize

The default font size (in pixels) for all text in the chart. You can override this using properties for specific chart elements.

chart.setFontSize(12);
java

ForcelFrame

Draws the diagram inside an inline frame. (Note that this option is ignored in IE8; all IE8 diagrams are drawn in i-frames).

chart.setForceIFrame(false);
java

ReverseCategories

If true, the slices are drawn counterclockwise. The default is clockwise.

chart.setReverseCategories(false);
java

Title

Text to display above the chart.

chart.setTitle("Chart");
java

TitlePosition

Where to place the chart title relative to the chart area. Supported values:

  • in - Draw the title inside the chart area.

  • out - Draw the title outside the chart area.

  • none - Omit the title.

barChart.setTitlePosition(TextPosition.OUT);
java

Configuration colors

Properties

Colors

The colors to use for the chart elements. An array of strings, where each element is an HTML color string, for example: "colors:['red','#004411']".

List<String> colors= Arrays.asList("#FFFFFF", "Red", "#F4g6uz");
chart.setColors(colors);
java

Background

The background color for the main area of the chart. Can be either a simple HTML color ring, for example: "'red'" or "'#00cc00'".

chart.setBackground(Background.Color("red"));
/*
 * Params = Bordercolor, Borderwidth, Backgroundcolor
 */
chart.setBackground(Background.StrokeFill("black", 5, "white"));
java