Here is a screenshot:
Of interest: the upper right part and the lower part.
In the lower part, there is one rule selected; this rule has: 1080 total invocations, including 274 successful invocations and 84 successful empty invocations. Right now I am displaying the ratio of successful vs total, and empty vs successful.
What I'd like to be able to do is scrap the ratios and instead have a single graphical bar showing the ratios of non empty successes/empty successes/failures, using the same color scheme as the pie chart above...
And one problem that I have is that I "didn't do anything" for that color scheme. Here is the code to fill the pie chart:
@Override
public void loadPieChart(final int failedMatches, final int emptyMatches,
final int nonEmptyMatches)
{
final int totalInvocations = failedMatches + emptyMatches
+ nonEmptyMatches;
final List<Data> list = new ArrayList<>(3);
int nr;
double percent;
String fmt;
/*
* Failures
*/
nr = failedMatches;
percent = 100.0 * nr / totalInvocations;
fmt = String.format("Failures (%d - %.02f%%)", nr, percent);
list.add(new Data(fmt, percent));
/*
* Empty
*/
nr = emptyMatches;
percent = 100.0 * nr / totalInvocations;
fmt = String.format("Empty matches (%d - %.02f%%)", nr, percent);
list.add(new Data(fmt, percent));
/*
* Non empty
*/
nr = nonEmptyMatches;
percent = 100.0 * nr / totalInvocations;
fmt = String.format("Non empty matches (%d; %.02f%%)", nr, percent);
list.add(new Data(fmt, percent));
display.matchChart.getData().setAll(list);
fmt = String.format("Rule rundown (%d total)", totalInvocations);
display.matchChart.setTitle(fmt);
}
Obtaining the data is not the problem, the problem is that I can't find in the JavaFX javadoc how I would display a "single graphic bar" like the above...
Where do I start?
(oh, and I suck at graphics so don't even ask me to "draw" what i want; if more precisions are needed I'll happily give them)
EDIT OK, here is an example of what I mean:
http://www.highcharts.com/demo/bar-stacked
Except that I only need one bar, I don't care about popup menus, I don't want the axes, I don't want the legend, I only want the bare, no frills bar.
Since then I have also modified the output a little:
The goal would be to replace the last column with that darned graphic which I don't know how to generate :(