Skip to main content

The attached workbook has been made with random data to demonstrate the issue. Whichever fruit has been selected (via a parameter) displays as an outlined circle, whereas all other fruit appear as filled circles. I would like to display an annotation on whichever fruit is selected. That would mean the annotation needs move to the correct item whenever the selection is changed. I have no idea how to do this. Note, the dual axis is already in use displaying some other info, so I can't use that as a workaround.

 

Below are some images that may help explaining the functionality I want:

 

Annotation on selected item:How do I annotate a changing mark?

User changes the selected item via parameter (annotation appears on the newly selected item):

img2

Any help would be appreciated,

Thanks!

4 risposte
  1. 31 lug 2020, 03:55

    I don't believe the annotation can be truly dynamic in the way that you are hoping. You can, however, use a label on the text mark that will be dynamic and will only label the selected mark (open circle). I mocked up the following. If you think this will work, then please read on.

     

    I don't believe the annotation can be truly dynamic in the way that you are hoping.

     

    Create three different calcs, each of them ensuring that the fruit in the viz matches the fruit in the parameter. If it does, then show the label and if it does not, then yield a null:

     

    @Label Selected Fruit 

    IF [Fruit] = [Select fruit] THEN [Fruit]

    ELSE NULL

    END

     

    @Label SomeXValue

    IF [Fruit] = [Select fruit] THEN 'someXvalue: ' + STR(INT([someXvalue]))

    ELSE NULL

    END

     

    @Label SomeYValue

    IF [Fruit] = [Select fruit] THEN 'someYvalue: ' + STR(INT([someYvalue]))

    ELSE NULL

    END

     

    Add those to the marks card on the shape axis. I knocked down the opacity on the color a bit as well. Now, that label will only appear on the mark in the parameter.

     

    Attached is a workbook. Let me know if this helps 😄 .

     

    Thanks,

     

    Kevin Flerlage

0/9000