Basics
Guides
API Reference
Basics
Guides
API Reference
HanSolo Charts adds a large set of JavaFX chart and visualization controls to
Aussom under fx.hansolo.charts. It is useful when the standard JavaFX chart
set is too limited and you need richer visualizations such as Sankey diagrams,
polar charts, radial charts, comparison charts, or custom XY plots.
The wrappers are AJI-first. That means the common controls are wrapped for direct use in Aussom, but you can still drop down to raw AJI if you need a less common constructor or Java method.
These are the classes most people will start with:
| Class | Use For |
|---|---|
HsBarChart |
Simple value-by-name bar charts. |
HsXYChart |
Axis-based XY charts with one or more HsXYPane layers. |
HsSankeyPlot |
Flow diagrams between source and target nodes. |
HsAxis |
HanSolo axis objects for XY-style charts. |
HsGrid |
Grid lines paired with HanSolo axes. |
HsChartItem |
Named numeric items for simple charts. |
HsXYChartItem |
X/Y points for XY charts. |
HsPlotItem |
Node items used by Sankey plots. |
Include the chart module and the JavaFX pieces you need:
include fx;
include fx.Color;
include fx.VBox;
include fx.hansolo.charts.charts;
This example creates a bar chart with two items.
include fx;
include fx.Color;
include fx.VBox;
include fx.hansolo.charts.charts;
app = fx.fxApp("HanSolo Bar Chart", 600, 400);
green = new Color("#37A169");
blue = new Color("#3182CE");
itemA = new HsChartItem("Alpha", 3.0);
itemA.setFill(green);
itemB = new HsChartItem("Beta", 6.0);
itemB.setFill(blue);
chart = new HsBarChart();
chart.setId("salesChart");
chart.setItems([itemA, itemB]);
chart.setPrefSize(560.0, 320.0);
chart.setAnimated(false);
root = new VBox();
root.add(chart);
app.setLayout(root);
app.show(true);
fx.shutdown();
This example uses HsAxis, HsGrid, HsXYPane, and HsXYChart together.
include fx;
include fx.Color;
include fx.hansolo.charts.charts;
app = fx.fxApp("HanSolo XY Chart", 700, 500);
red = new Color("#E53E3E");
xAxis = new HsAxis();
xAxis.setTitle("Time");
xAxis.setMinMax(0.0, 10.0);
xAxis.setPosition("BOTTOM");
yAxis = new HsAxis();
yAxis.setTitle("Value");
yAxis.setMinMax(0.0, 10.0);
yAxis.setPosition("LEFT");
grid = new HsGrid(xAxis, yAxis);
grid.setGridOpacity(0.35);
p1 = new HsXYChartItem(1.0, 3.0, "P1", red);
p2 = new HsXYChartItem(4.0, 6.0, "P2", red);
p3 = new HsXYChartItem(8.0, 5.0, "P3", red);
pane = new HsXYPane([p1, p2, p3], "LINE", "Series A");
pane.setBounds(0.0, 10.0, 0.0, 10.0);
chart = new HsXYChart(pane, [xAxis, yAxis], grid);
chart.setTitle("Trend");
chart.setSubTitle("Sample Data");
chart.setPrefSize(640.0, 420.0);
app.setLayout(chart);
app.show(true);
fx.shutdown();
This example creates a small Sankey flow from one node to another.
include fx;
include fx.Color;
include fx.hansolo.charts.charts;
app = fx.fxApp("HanSolo Sankey", 700, 500);
green = new Color("#37A169");
blue = new Color("#3182CE");
src = new HsPlotItem("Source", 10.0, green);
src.setLevel(0);
dst = new HsPlotItem("Target", 10.0, blue);
dst.setLevel(1);
src.addOutgoing(dst, 10.0);
plot = new HsSankeyPlot();
plot.setItems([src, dst]);
plot.setStreamFillMode("COLOR");
plot.setUseItemColor(true);
plot.setPrefSize(640.0, 420.0);
app.setLayout(plot);
app.show(true);
fx.shutdown();
HsXYPane is built around HanSolo XYSeries objects internally. The wrapper
hides that, so prefer new HsXYPane([items], "LINE", "Series") instead of
trying to build the Java series yourself first.HsSankeyPlot needs valid HsPlotItem levels. Set them with setLevel()
before calling setItems(...)..obj and AJI.fx.fxApp(...).
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.