GemBulletChart
A bullet chart is a variation of the bar chart. It features a single, primary measure, compares that measure to one or more other measures to enrich its meaning (for example, compared to a target), and displays it in the context of qualitative ranges of performance, such as poor, satisfactory, and good. For example, it can be used as a KPI widget on a dashboard, showing this month's revenue against its target, or to display progress towards a project deadline.
Usage Example
/* (c) https://github.com/MontiCore/monticore */
package example_charts;
import Domain.Person;
import common.ExamplePage;
import mc.fenix.arrange.GemColumn;
import mc.fenix.charts.GemBulletChart;
page GemBulletChartExample(
List<Person> persons,
List<Integer> range,
List<Integer> steps
) {
@ExamplePage(
component = @GemColumn(components = [
bulletchart@GemBulletChart(
value = null,
reference = 4000,
thresholdvalue = 4000,
title = "Profit of MontiCore Inc. from stocks",
subtitle = "in US $",
range = range,
steps = steps,
showConfig = true
),
bulletchart2@GemBulletChart(
value = 3500,
reference = 4000,
thresholdvalue = 4000,
title = "Profit of MontiCore Inc. from stocks",
subtitle = "in US $",
range = [0, 5000],
steps = [1500, 3000],
showConfig = true
),
targetMetChart@GemBulletChart(
value = 4500,
reference = 4000,
thresholdvalue = 4200,
title = "Revenue",
subtitle = "in k$",
range = [0, 5000],
steps = [2000, 3500],
showConfig = true
),
targetMissedChart@GemBulletChart(
value = 65,
reference = 80,
thresholdvalue = 90,
title = "Customer Satisfaction",
subtitle = "Score (0-100)",
range = [0, 100],
steps = [50, 75],
showConfig = true
),
manyStepsChart@GemBulletChart(
value = 750,
reference = 700,
thresholdvalue = 800,
title = "Server Load",
subtitle = "Requests/sec",
range = [0, 1000],
steps = [200, 400, 600, 800],
showConfig = true
),
minimalChart@GemBulletChart(
value = 12,
reference = 10,
thresholdvalue = 15,
title = "Defect Rate",
subtitle = "%",
range = [0, 20],
steps = [],
showConfig = true
)
]),
basePath = "example_charts",
componentName = "GemBulletChartExample"
);
}
GUI Model
component GemBulletChart(
Integer value,
Integer reference,
Integer thresholdvalue,
String title,
String subtitle,
List<Integer> range,
List<Integer> steps,
boolean showConfig = false
)
| Name | Type | Description | Default value |
|---|---|---|---|
value |
Integer |
The primary measure or actual value to be displayed and evaluated. | |
reference |
Integer |
The reference value or target measure to compare the primary value against. | |
thresholdvalue |
Integer |
A specific threshold value indicating a critical limit or milestone. | |
title |
String |
The main title of the bullet chart. | |
subtitle |
String |
The subtitle providing additional context, such as the unit of measurement. | |
range |
List<Integer> |
The qualitative ranges of performance (e.g., boundaries for poor, satisfactory, and good performance). | |
steps |
List<Integer> |
The step values used for generating the axis scale or ticks. | |
showConfig |
boolean |
Whether the chart's configuration panel is shown. | false |