amalgame/commit
IMPROVED: SVG node labeling
author | Jacco van Ossenbruggen |
---|---|
Mon Sep 29 18:28:53 2014 +0200 | |
committer | Jacco van Ossenbruggen |
Mon Sep 29 18:28:53 2014 +0200 | |
commit | c0fd67a394db09520625bfe4f72e62eda56ead66 |
tree | 6217be54f2ea457142bbd697be1cf624625e57fe |
parent | 99e76b2eb54f5b89dc8bbd1b24ad3a537c537978 |
Diff style: patch stat
diff --git a/api/strategy_viz.pl b/api/strategy_viz.pl index d1b73ae..fd523eb 100644 --- a/api/strategy_viz.pl +++ b/api/strategy_viz.pl @@ -223,22 +223,26 @@ stats_label_list(Strategy, Resource, [Count]) :- stats_label_list(Strategy, Resource, [ConceptStats]) :- node_stats(Strategy, Resource, Stats, [compute(false)]), option(inputPercentage(IPerc), Stats), IPerc > 0.5, % is too confusing when rounded to 0% - option(sourcePercentageInput(SPerc), Stats), - option(targetPercentageInput(TPerc), Stats), + option(sourcePercentageInput(SPerc), Stats), SPerc > 0.5, + option(targetPercentageInput(TPerc), Stats), TPerc > 0.5, format(atom(ConceptStats), '~0f% (~0f% ~0f%)', [IPerc, SPerc, TPerc]), !. stats_label_list(Strategy, Resource, [ConceptStats]) :- node_stats(Strategy, Resource, Stats, [compute(false)]), - option(sourcePercentageInput(SPerc), Stats), - option(targetPercentageInput(TPerc), Stats), + option(sourcePercentageInput(SPerc), Stats), SPerc > 0.5, + option(targetPercentageInput(TPerc), Stats), TPerc > 0.5, format(atom(ConceptStats), '~0f% ~0f%', [SPerc, TPerc]), !. stats_label_list(Strategy, Resource, [IPercA]) :- node_stats(Strategy, Resource, Stats, [compute(false)]), - option(inputPercentage(IPerc), Stats), + option(inputPercentage(IPerc), Stats), IPerc > 0.5, format(atom(IPercA), '~0f%', [IPerc]), !. +stats_label_list(Strategy, Resource, [Count]) :- + node_stats(Strategy, Resource, Stats, [compute(false)]), + option(totalCount(Count), Stats), + !. stats_label_list(_, _, []).