diff --git a/src/oping.c b/src/oping.c
index cce437904d856ff01571b1ffede9c41362a33f84..3e735ffde1271c09a00eaefb25984ed497948cc8 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
opt_show_graph = 0;
else if (strcasecmp ("prettyping", optarg) == 0)
opt_show_graph = 1;
- else if (strcasecmp ("boxplot", optarg) == 0)
- opt_show_graph = 2;
else if (strcasecmp ("histogram", optarg) == 0)
+ opt_show_graph = 2;
+ else if (strcasecmp ("boxplot", optarg) == 0)
opt_show_graph = 3;
else
fprintf (stderr, "Unknown graph option: %s\n", optarg);
@@ -1203,9 +1203,9 @@ static int update_stats_from_context (ping_context_t *ctx, pingobj_iter_t *iter)
if (opt_show_graph == 1)
update_graph_prettyping (ctx, latency, sequence);
else if (opt_show_graph == 2)
- update_graph_boxplot (ctx);
- else if (opt_show_graph == 3)
update_graph_histogram (ctx);
+ else if (opt_show_graph == 3)
+ update_graph_boxplot (ctx);
wrefresh (ctx->window);
break;
else if (key == KEY_RESIZE)
need_resize = 1;
+ else if (key == 'g')
+ {
+ if (opt_show_graph == 3)
+ opt_show_graph = 1;
+ else if (opt_show_graph > 0)
+ opt_show_graph++;
+ }
}
if (need_resize)