SAP Knowledge Base Article - Public

3410823 - SAC Analytics Designer : Wrong alignment of legend in R Widget (SAC LOD-ANA-AD)

Symptom

  • Alignment of the legend of R widgets is wrongly displaying in Analytics Application.

R_Widget_01.jpg
- With the same R widgets with same settings, alignments of the legend are correctly displayed in Story
R_Widget_02.jpg

Environment

SAP Analytics Cloud (Enterprise) 2023.x

Resolution

  1. Open the styling panel for the widget RVisualization_n and the other R widget having this issue.
  2. Unselected the checkbox "Show this item at view time" under the "Action" section.
  3. Select xx_TabBar_xx and open the script editor of the "onSelect" event and add below sample script
    var selectedKey = xx_TabBar_xx.getSelectedKey();
    switch(selectedKey)
    {
    case "PID_tab1":
    RVisualization_1.setVisible(true);
    break;
    case "PID_tab2":
    RVisualization_2.setVisible(true);
    break;
    }

See Also

Keywords

R Widget, setVisible, RVisualization, getSelectedKey, Legend, Alignment, style, Analytics Designer , KBA , LOD-ANA-AD , Analytics Designer , Problem

Product

SAP Analytics Cloud all versions