@groovy.transform.CompileStatic class DiagramDatasetSpec extends DiagramActionSpec
Constructor and description |
---|
DiagramDatasetSpec
(IUiDiagramVisitor diagramVisitor) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
dataset(java.lang.String key, BigDecimal[] yDataList) |
|
void |
dataset(java.lang.String key, BigDecimal yData) |
|
void |
dataset(java.lang.String key, java.util.Map<java.lang.Object, BigDecimal> dataMap) |
|
void |
dataset(java.lang.String key, java.util.Date[] dates) Group the given dates according to DiagramXLabelDateFormat, then count every group and put the result as data to draw. |
|
void |
labels(java.lang.Number[] labels) |
|
void |
labels(java.lang.String[] labels) |
|
void |
labels(diagram.scene.DiagramXLabelDateFormat dateFormat, java.util.Date[] dates) |
Methods inherited from class | Name |
---|---|
class DiagramActionSpec |
diagramAction, diagramAction, diagramAction, diagramAction |
Group the given dates according to DiagramXLabelDateFormat, then count every group and put the result as data to draw. For example: Knowing DiagramXLabelDateFormat.MONTH (Defined by labels(DiagramXLabelDateFormat dateFormat)), and being given dates: 2025-01-01, 2025-01-10, 2025-01-20, 2025-02-01, 2025-02-10, 2025-03-01. So they are divided to 3 groups with their own count: [2025-01: 3, 2025-02: 2, 2025-03: 1]. The groups will be used as data to draw: - xLabels = ["2025-01", "2025-02", "2025-03"] - yDataList = [3.0, 2.0, 1.0]