Feature #583

Ability to include attributes as a macro values in Text/AnnotationTool

Added by Mike Smyser over 6 years ago. Updated over 6 years ago.

Status:ResolvedStart date:10/13/2011
Priority:NormalDue date:
Assignee:Andy Dufilie% Done:


Target version:1.0
Complexity: OIC Priority:
Required by:Seattle, WA


This feature would be very helpful for creating descriptive captions when the DimensionSlider is being used. For example, if we're looking at obesity rates by state, we could have text that described what's in the current view (e.g., "In the year <AAAA>, the state of <BBBB> had the highest rate of obesity of <CC>%, while <DDDD> had the lowest rate (<EE>%)"). Each year displayed would have a unique values for each of the macros used.

Related issues

Related to Weave - Feature #577: Dimension slider value (e.g., year) able to be placed in "custom" SessionedTextBox/Annotation Tool Resolved 10/11/2011
Related to Weave - Bug #628: Inline code in annotations does not work with xml-escaped characters such as quotes. Open 11/04/2011


#1 Updated by Mike Smyser over 6 years ago

Possibly related to #577, but #577 is an immediate need for us.

#2 Updated by Andy Dufilie over 6 years ago

  • Status changed from Open to Resolved
  • Assignee set to Andy Dufilie

#3 Updated by Andy Dufilie over 6 years ago

Many things can now be done by defining macros in the session state. See #577 for an example. Just ask if you need help creating macros. There is no GUI yet (#614).

The following example can be used to get the title of the default color column into a text annotation or tool title:

In WeaveProperties:

<macros encoding="dynamic">
  <LinkableFunction name="getObject">WeaveAPI.ExternalSessionStateInterface.getObject</LinkableFunction>

and in the title/annotation:

The color attribute is {getObject(['defaultColorDataColumn']).getMetadata('title')}

#4 Updated by Andy Dufilie over 6 years ago

  • Required by set to Seattle, WA

#5 Updated by Andy Dufilie over 6 years ago

Here's an example getting a record from a column:

In WeaveProperties:

<macros encoding="dynamic">
  <LinkableFunction name="getObject">WeaveAPI.ExternalSessionStateInterface.getObject</LinkableFunction>
  <LinkableFunction name="colorColumn">getObject(['defaultColorColumn'])</LinkableFunction>
  <LinkableFunction name="QKey">WeaveAPI.QKeyManager.getQKey</LinkableFunction>

and in the title/annotation:

{ colorColumn.getMetadata('title') } for Alabama is { getString(colorColumn, QKey('US State FIPS Code', '01')) }

which evaluates to something like:
Percent Obese 1995 for Alabama is 18.7%

However, bug #628 prevents this from working in an annotation at the moment.

#6 Updated by Andy Dufilie over 6 years ago

  • Target version set to 1.0

Also available in: Atom PDF