anchor.diff:  %% Report config
   %%
   %% A key-value list [{Id, Cfg}] where Id is a frame identifier
  -%% and Cfg is a further tuple list. Currently this is only used
  -%% to store a single type of tuple, {sort, ColN, Dir} to specify
  -%% the currently selected sort on the frame.
  +%% and Cfg is a further tuple list where tuple size may vary.
  +%% Currently the following tuple types are used for Cfg:
  +%% - {sort, ColN, Dir} to specify the currently selected sort on
  +%%      the frame;
  +%% - {show_table, boolean()} to specify whether a table with the
  +%%      raw data underlying the graph should be shown.
   config_update(ReportCfg, Link) ->
  -    [IdStr, ColStr] = string:tokens(Link, "."),
  +    [IdStr, KeyStr | ArgsStrL] = string:tokens(Link, "."),
       Id = list_to_atom(IdStr),
  +    Key = list_to_atom(KeyStr),
  +    OldSetting = config_lookup(Id, Key, ReportCfg),
  +    NewSetting = config_update(Key, OldSetting, ArgsStrL),
  +    config_store(Id, NewSetting, ReportCfg).
  +
  +config_update(show_table, _OldSetting, [BooleanStr]) ->
  +    {show_table, list_to_atom(BooleanStr)};
  +config_update(sort, OldSetting, [ColStr]) ->
       ColN = list_to_integer(ColStr),
  -    Sort = case config_lookup(Id, sort, ReportCfg) of
  -               {sort, ColN, Dir} -> {sort, ColN, invert_dir(Dir)};
  -               _                 -> {sort, ColN, ascending}
  -           end,
  -    config_store(Id, Sort, ReportCfg).
  +    case OldSetting of
  +        {sort, ColN, Dir} -> {sort, ColN, invert_dir(Dir)};
  +        _                 -> {sort, ColN, ascending}
  +    end.
   
   config_store(Id, CfgTuple, ReportCfg) ->
       Cfg = case lists:keyfind(Id, 1, ReportCfg) of
  
positive.code: 
  config_lookup(Id, Key, ReportCfg) ->
      case lists:keyfind(Id, 1, ReportCfg) of
          false     -> false;
          {Id, Cfg} -> lists:keyfind(Key, 1, Cfg)
      end.
  
  invert_dir(ascending) -> descending;
  invert_dir(descending) -> ascending.
  
negative.code: report_ext(atom,_Ext,_ReportCfg) -> []; % used as Samples in the common report
  report_ext(binary, Ext, ReportCfg) -> report_ext(bitstring, Ext, ReportCfg);
  report_ext(bitstring, Ext, ReportCfg) ->
      histogram(size_dist, "Bit size histogram", Ext, ReportCfg);
  report_ext(nonempty_list, Ext, ReportCfg) ->
      histogram(length_dist, "List length histogram", Ext, ReportCfg);
  report_ext(_Class, Ext,_ReportCfg) ->
      [{font, [{size, "+2"}], [br, {str, "Extended data (raw)"}, br, br]},
       {term, Ext}].
  
  histogram(Id, Title, Ext, ReportCfg) ->
      {show_table, ShowTable} = config_lookup(Id, show_table, ReportCfg),
      {width, Width} = config_lookup(report, width, ReportCfg),
      PngFile = ds_graphics:histogram_graph([{xsize, Width-36}], %% FIXME
                                            Ext),
      ds_graphics:gc_image_file(PngFile, ?IMAGE_GC_TIMEOUT),
      Link = config_link(Id, show_table, not ShowTable),
      LinkText = case ShowTable of
                     true  -> "[Hide table]";
                     false -> "[Show table]"
                 end,
      [{table, [{width, "100%"},
                {cellspacing, 0}],
       [{tr, [], [{td, [], [br]}]}, % vskip
        {tr, [],
         [{th, [{align, left}],
           [{font, [{size, "+1"}], [{str, Title}]}]}]},
        {tr, [{bgcolor, ?COLOR_PTHEAD}],
         [{th, [{align, left}],
           [{a, [{href, Link}], [{str, LinkText}]}]}]},
        {tr, [],
         [{td, [],
           [{img, [{src, PngFile}], []}]}]},
        {tr, [],
         [{td, [],
           [{table, [{cellspacing, 0}],
             histogram_data_table(ShowTable, Id, Ext, ReportCfg)}]}]}]}].
  
  histogram_data_table(false,_Id,_Data,_ReportCfg) -> [];
  histogram_data_table(true, Id, Data, ReportCfg) ->
      frame(Id, stats_headers(false), Data, fun stats_display_f/1, ReportCfg).
  
  %% A frame shows tabular data and allows the user to click on headers
  %% to sort the data according to a certain column.
  