  We present new language-based dynamic analysis techniques for linking
visualisations and other structured outputs to data in a fine-grained way,
allowing a user to interactively explore how data attributes map to visual or
other output elements by selecting (focusing on) substructures of interest.
This can help both programmers and end-users understand how data sources and
complex outputs are related, which can be a challenge even for someone with
expert knowledge of the problem domain. Our approach builds on bidirectional
program slicing techiques based on Galois connections, which provide desirable
round-tripping properties.
  Unlike the prior work in program slicing, our approach allows selections to
be negated. In a setting with negation, the bidirectional analysis has a De
Morgan dual, which can be used to link different outputs generated from the
same input. This offers a principled language-based foundation for a popular
interactive visualisation feature called brushing and linking where selections
in one chart automatically select corresponding elements in another related
chart. Although such view coordination features are valuable comprehension
aids, they tend be to hard-coded into specific applications or libraries, or
require programmer effort.
