Properties | |
---|
Gantt Arrow Configuration | For Gantt Charts, gantt.arrow controls the various properties of the arrows connecting tasks. Examle: Code Block |
---|
| final Arrow arrow = Arrow.Builder()
.angle(1) //The angle of the head of the arrow.
.color("blue") //The color of the arrows.
.length(4) //The length of the head of the arrow.
.width(3) //The width of the arrows.
.radius(0) //The radius for defining the curve of the arrow between two tasks.
.spaceAfter(3) //The amount of whitespace between the head of an arrow and the task to which it points.
.build(); |
| .angle
| .color
|
Gantt Configuration | A suffix to be added to all values in the legend and tick labels in the vertical axes.Example: Code Block |
---|
| annotationChart.setAllValuesSuffix("Suf"); |
|
AnnotationWidth | The width (in percent) of the annotations area, out of the entire chart area. Must be a number in the range 5-80. Code Block |
---|
| annotationChart.setAnnotationsWidth(10); |
|
DateFormat | The format used to display the date information in the top right corner. The format of this field is as specified by the java SimpleDateFormat class. Code Block |
---|
annotationChart.setDateFormat("HH:mm MMMM dd, yyyy"); |
Default: Either 'MMMM dd, yyyy' or 'HH:mm MMMM dd, yyyy', depending on the type of the first column (date, or datetime, respectively). |
DisplayAnnotations | If set to false, the chart will hide the annotations table, and the annotations and annotationText will not be visible (the annotations table will also not be displayed if there are no annotations in your data, regardless of this option). When this option is set to true, after every numeric column, two optional annotation string columns can be added, one for the annotation title and one for the annotation text. Code Block |
---|
annotationChart.setDisplayAnnotations(true); |
|
DisplayAnnotationFilter | If set to true, the chart will display a filter control to filter annotations. Use this option when there are many annotations. Code Block |
---|
annotationChart.setDisplayAnnotationsFilter(true); |
|
DisplayDateBarSeparator | Whether to display a small bar separator ( | ) between the series values and the date in the legend, where true means yes. Code Block |
---|
annotationChart.setDisplayDateBarSeparator(true); |
|
DisplayExactValues | Whether to display a shortened, rounded version of the values on the top of the graph, to save space; false indicates that it may. For example, if set to false, 56123.45 might be displayed as 56.12k. Code Block |
---|
annotationChart.setDisplayExactValues(true); |
|
DisplayLegendDots | Whether to display dots next to the values in the legend text, where true means yes. Code Block |
---|
| annotationChart.setDisplayLegendDots(true); |
|
DisplayLegendValues | Whether to display the highlighted values in the legend, where true means yes. Code Block |
---|
annotationChart.setDisplayLegendValues(true); |
|
DisplayRangeSelector | Whether to show the zoom range selection area (the area at the bottom of the chart), where false means no. The outline in the zoom selector is a log scale version of the first series in the chart, scaled to fit the height of the zoom selector. Code Block |
---|
annotationChart.setDisplayRangeSelector(true); |
|
DisplayZoomButtons | Whether to show the zoom buttons ("1d 5d 1m" and so on), where false means no. Code Block |
---|
annotationChart.setDisplayZoomButtons(true); |
|
Fill | A number from 0—100 (inclusive) specifying the alpha of the fill below each line in the line graph. 100 means 100% opaque, and 0 means no fill at all. The fill color is the same color as the line above it. Code Block |
---|
| annotationChart.setFill(50); |
|
LegenPosition | Whether to put the colored legend on the same row with the zoom buttons and the date ('sameRow'), or on a new row ('newRow'). Code Block |
---|
annotationChart.setLegendPosition(LegendPosition.SAME_ROW); |
|
ScaleFormat | Number format to be used for the axis tick labels. The default of '#' displays as an integer. Code Block |
---|
annotationChart.setScaleFormat("#"); |
|
NumberFormats | Specifies the number format patterns to be used to format the values at the top of the graph. The patterns should be in the format as specified by: https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html If not specified, the default format pattern is used. If a single string pattern is specified, it is used for all of the values. If a map is specified, the keys are (zero-based) indexes of series, and the values are the patterns to be used to format the specified series. You are not required to include a format for every series on the chart; any unspecified series will use the default format.
If this option is specified, the displayExactValues option is ignored. Code Block |
---|
| annotationChart.setNumberFormats(NumberFormats.ForAll("#")); |
|
ScaleType | Sets the maximum and minimum values shown on the Y axis. The following options are available: 'maximized' - The Y axis will span the minimum to the maximum values of the series. If you have more than one series, use allmaximized. 'fixed' [default] - The Y axis varies, depending on the data values values: If all values are >=0, the Y axis will span from zero to the maximum data value. If all values are <=0, the Y axis will span from zero to the minimum data value. If values are both positive and negative, the Y axis will range from the series maximum to the series minimum. For multiple series, use 'allfixed'.
'allmaximized' - Same as 'maximized,' but used when multiple scales are displayed. Both charts will be maximized within the same scale, which means that one will be misrepresented against the Y axis, but hovering over each series will display its true value. 'allfixed' - Same as 'fixed,' but used when multiple scales are displayed. This setting adjusts each scale to the series to which it applies (use this in conjunction with scaleColumns ).
If you specify the min and/or max options, they will take precedence over the minimum and maximum values determined by your scale type. Code Block |
---|
annotationChart.setScaleType(ScaleType.ALL_MAXIMIZED); |
|
Thickness | A number from 0—10 (inclusive) specifying the thickness of the lines, where 0 is the thinnest. Code Block |
---|
annotationChart.setThickness(5); |
|
ZoomStartTime | Sets the start date/time of the selected zoom range. Code Block |
---|
annotationChart.setZoomStartTime(DateValue.Date(LocalDate.now())); |
|
ZoomEndTime | Sets the end date/time of the selected zoom range. Code Block |
---|
| annotationChart.setZoomEndTime(DateValue.Date(LocalDate.now().plusDays(5))final Gantt gantt = Gantt.Builder()
.arrow(arrow)
.barCornerRadius(0) //The radius for defining the curve of a bar's corners.
.barHeight(15) //The height of the bars for tasks.
.criticalPathEnabled(true) //If true any arrows on the critical path will be styled differently.
.criticalPathStyle(LineStyle.New("red", 3)) //An object containing the style for any critical path arrows.
.defaultStartDate(DateValue.Date(LocalDate.now())) //If the start date cannot be computed from the values in the DataTable, the start date will be set to this.
.innerGridDarkTrack(BarStyle.New("white")) //The fill color of the inner grid track.
.innerGridHorizLine(LineStyle.New("black", 3)) //Defines the style of the inner horizontal grid lines.
.innerGridTrack(BarStyle.New("gray")) //The fill color of the inner grid track.
.labelStyle(TextStyle.New("black", "Arial", 12)) //An object containing the styles for task labels.
.labelMaxWidth(20) //The maximum amount of space allowed for each task label.
.percentEnabled(true) //Fills the task bar based on the percentage completed for the task.
.shadowColor("blue") //Defines the color of the shadows under any task bar which has dependencies.
.shadowEnabled(true) //If set to true, draws a shadow under each task bar which has dependencies.
.shadowOffset(4) //Defines the offset, in pixels, of the shadows under any task bar which has dependencies.
.trackHeight(40) //The height of the tracks.
.build();
this.ganttChart.setGantt(gantt); |
|