ActiveUI

ActiveUI

  • User Guide
  • Developer Documentation

›Charts Gallery

Charts Gallery

  • Bubble Chart
  • Clustered Columns Chart
  • Side-by-side Bar Charts - Column mapping
  • Daily Change in Labels
  • Epoch Chart
  • Highlighted Points
  • Regression Line
  • Side-by-side - Rows mapping
  • Scatter Plot with Gradient color of Points
  • Sorted Bars Chart
  • Stacked Bars

Highlighted Points

Example

Illustration

Summary of settings

  • Type of chart: Lines
  • Mapping of "y" attribute: Risk
  • Mapping of "x" attribute: Value Date
  • Color mapped to iif() MDX expression
  • Option → Common attributes → Line → Marker size mapped to iif() MDX expression

Step-by-step instruction

  1. Add new Chart Widget

  2. Select "Line"

  3. If there are multiple cubes connected to your application, you must select the cube you want for the chart.

  4. To map the "x" attribute, select the time dimension, in this case Value Date

  5. To map the "y" attribute, select the value (measure) corresponding to vertical axes, in this case Risk

    The chart displays with axes mapped.

    Illustration

  6. To keep markers only for those points where the value is above some threshold, for example 10000. Click Options in the Legend area of the chart:

    Illustration

    In the lower part of the Options popup find attributes specific to Line chart, in particular "Marker size" attribute. Map it to a formula, returning 3 (pixels) for outliers and 0 for the rest.

     iif(
         [Measures].[Risk] > 10000,
         3,
         0
     )
    

    Illustration

    Now only the outliers are marked:

    Illustration

  7. Finally, assign colors. Generate two values for the color scale: zero for outliers and one for the rest. In the Options popup (from Legend) find the field "Color" and map it to a formula:

     iif(
         [Measures].[Risk] > 10000,
         0,
         1
     )
    

    Illustration

  8. The chart is almost complete:

    Illustration

  9. To add a horizontal line for threshold, open Options popup (from Legend) and find the "Overlay" tab:

    Illustration

The example is complete:

Illustration

Back to Chart Gallery

Appendix

The appendix contains code snippets for advanced users.

MDX:

WITH
 Member [Measures].[Color Coding] AS iif(
  measures.[Risk] > 10000,
  0,
  1
), FORMAT_STRING = "#,###.##"
 Member [Measures].[Marker Size] AS iif(
  measures.[Risk] > 10000,
  3,
  0
), FORMAT_STRING = "#,###.##"
SELECT
  {
    [Measures].[Color Coding],
    [Measures].[Marker Size],
    [Measures].[Risk]
  } ON COLUMNS,
  NON EMPTY [Time].[TimeBucket].[Value Date].Members ON ROWS
    FROM [EquityDerivativesCube]

JSON:

{
  "configurations": [
    {
      "handlers": {
        /* ... */
      },
      "type": "combo-line",
      "mapping": {
        "x": {
          "from": ["[Time].[TimeBucket].[Value Date]"],
          "domainExtent": 1,
          "labelsInterval": 6
        },
        "y": {
          "from": "Value",
          "ticks": 6
        },
        "split": {
          "from": ["numeric"],
          "numericMembers": ["[Measures].[Risk]"]
        },
        "color": {
          "from": "[Measures].[Color Coding]"
        },
        "line@size": {
          "from": "[Measures].[Marker Size]"
        }
      },
      "legend": {
        "display": "hidden"
      },
      "overlays": [
        {
          "key": "constant",
          "args": {
            "color": "#ff0000",
            "value": 10000
          }
        }
      ]
    }
  ]
}
← Epoch ChartRegression Line →
  • Example
  • Summary of settings
  • Step-by-step instruction
  • Appendix
Copyright © 2021 ActiveViam