+sub output_graph_named_qtype
+{
+ my @inst = @_;
+ my @ret = ();
+
+ die if (@inst < 2);
+
+ my @colors = get_n_colors (scalar (@inst));
+
+ for (my $i = 0; $i < scalar (@inst); $i++)
+ {
+ my $inst = $inst[$i];
+ push (@ret,
+ "DEF:avg_$i=$AbsDir/qtype-$inst.rrd:value:AVERAGE",
+ "DEF:min_$i=$AbsDir/qtype-$inst.rrd:value:MIN",
+ "DEF:max_$i=$AbsDir/qtype-$inst.rrd:value:MAX");
+ }
+
+ for (my $i = 0; $i < scalar (@inst); $i++)
+ {
+ my $inst = $inst[$i];
+ my $color = $colors[$i];
+ my $type = ($i == 0) ? 'AREA' : 'STACK';
+
+ if (length ($inst) > 5)
+ {
+ $inst = substr ($inst, 0, 5);
+ }
+ else
+ {
+ $inst = sprintf ('%-5s', $inst);
+ }
+
+ push (@ret,
+ "$type:avg_$i#$color:$inst",
+ "GPRINT:min_$i:MIN:%9.3lf Min,",
+ "GPRINT:avg_$i:AVERAGE:%9.3lf Avg,",
+ "GPRINT:max_$i:MAX:%9.3lf Max,",
+ "GPRINT:avg_$i:LAST:%9.3lf Last\\l");
+ }
+
+ return (@ret);
+}