Create Beautiful JavaFX Charts with AsciidocFX
JavaFX has 8 kind of Chart components and AsciidocFX supports all of them.
Pie Chart
[chart,pie,file="secim-2014-pie.png",opt="title=2014 YEREL SEÇİM SONUÇLARI"] -- AKP, 45.6, orange CHP, 27.8,red MHP, 15.2 BDP, 4.2 SP, 2 --
All options are optional. To see all available options please look at chart options |
Line Chart
[chart,line,file="secim-2014-line.png",opt="title=Line Chart,title-color=blue"] -- //April 1, 4 3, 10 6, 15 9, 8 12, 5 //May 1, 20 3, 15 6, 13 9, 12 12, 14 --
Area Chart
[chart,area,file="area-chart.png",opt="y-label-rotation=-20,x-label-rotation=+20"] -- //April 1, 4 3, 10 6, 15 9, 8 12, 5 //May 1, 20 3, 15 6, 13 9, 12 12, 14 --
Bar Chart
[chart,bar,file="bar-chart.png",opt="legend=left"] -- //AKP 1, 45.6, orange //CHP 2, 27.8,red //MHP 3, 15.2 //BDP 4, 4.2 //SP 5, 2 --
Scatter Chart
[chart,scatter,file="scatter-chart.png"] -- //April 1, 4 3, 10 6, 15 9, 8 12, 5 //May 1, 20 3, 15 6, 13 9, 12 12, 14 --
Bubble Chart
[chart,bubble,file="bubble-chart.png"] -- //April 1, 4 3, 10 6, 15 9, 8 12, 5 //May 1, 20 3, 15 6, 13 9, 12 12, 14 --
Stacked Area Chart
[chart,"stacked-area",file="stacked-area-chart.png"] -- //April 1, 4 3, 10 6, 15 9, 8 12, 5 //May 1, 20 3, 15 6, 13 9, 12 12, 14 --
Stacked Bar Chart
[chart,"stacked-bar",file="stacked-bar-chart.png"] -- //April 1, 4 3, 10 6, 15 9, 8 12, 5 //May 1, 20 3, 15 6, 13 9, 12 12, 14 --
Using External CSV data
If you don’t want to use data inside block, we have block macros to reference data in external CSV file.
chart::pie[data-uri=pie.csv] chart::bar[data-uri=bar.csv] chart::line[data-uri=line.csv] chart::area[data-uri=area.csv] chart::bubble[data-uri=bubble.csv] chart::scatter[data-uri=scatter.csv] chart::stacked-area[data-uri=stacked-area.csv] chart::stacked-bar[data-uri=stacked-bar.csv]
To get started with Asciidoc FX, just download and install it! https://github.com/asciidocfx/AsciidocFX/releases
Tag:asciidocfx, asciidoctor, backend, javafx
1 Comment