ActiveUI

ActiveUI

  • User Guide
  • Developer Documentation

Scatter Plot with Gradient color of Points

Example

Illustration

Summary of settings

  • Type of chart: Scatter
  • Mapping of y attribute: Profit
  • Mapping of x attribute: Size
  • Cardinality: City
  • Color mapped to a third measure of interest, Count
  • Text mapped to City

Step-by-step instruction

  1. Add new Chart Widget

  2. Select Scatter

  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 a measure or a formula for the horizontal axis, in this example, Size.

  5. Map the y attribute in the same way as for the x attribute, in this example, Profit.

  6. The chart displays one point, the total for the measure selected on the x axis plotted against total for the measure selected on the y axis.

  7. Select the members of the dimension City, by clicking Options in the Legend area of the chart:

    Illustration

    In the Options popup you can change various attributes, in this case map Cardinality to City:

    Illustration

    The chart displays with six points on the scatter plot, since there are six members in the City dimension having Size and Profit linked to them:

    Illustration

    Use filters to limit the scope of data in the view Filters

  8. To display the names of City member, go back to Options (in the Legend) and map Text to City:

    Illustration

    The text labels display:

    Illustration

  9. Map Color to the third measure of interest in the same Option popup.

    For this example, map color to contributors.COUNT:

    Illustration

The chart is complete now. New York is very different from all other points because the number of contributors, contributors.COUNT, is low.

Illustration

Back to Legacy Chart Gallery

Appendix

The appendix contains code snippets for advanced users.

MDX:

SELECT
  {
    [Measures].[Profit],
    [Measures].[Size],
    [Measures].[contributors.COUNT]
  } ON COLUMNS,
  NON EMPTY [Geography].[City].[City].Members ON ROWS
  FROM [EquityDerivativesCube]

JSON:

{
  "configurations": [
    {
      "handlers": {
        /* ... */
      },
      "type": "scatter",
      "mapping": {
        "x": {
          "from": "[Measures].[Size]",
          "ticks": 7
        },
        "y": {
          "from": "[Measures].[Profit]",
          "ticks": 5
        },
        "cardinality": {
          "from": ["[Geography].[City].[City]"]
        },
        "text": {
          "from": ["[Geography].[City].[City]"]
        },
        "color": {
          "from": "[Measures].[contributors.COUNT]"
        }
      },
      "legend": {
        "display": "hidden"
      }
    }
  ]
}
  • Example
  • Summary of settings
  • Step-by-step instruction
  • Appendix
Copyright © 2020 ActiveViam