ActiveUI

ActiveUI

  • User Guide
  • Developer Documentation

Positive Negative Sorted Bars Chart

Example

Illustration

Summary of settings

  • Type of chart: Bars
  • Mapping of y attribute: City
  • Mapping of x attribute: Profit
  • Cities are sorted by profit
  • Color is mapped to a measure, in this case profit
  • The Positive/Negative color profile is selected

Step-by-step instruction

  1. Add new Chart Widget.

  2. Select Bars.

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

  4. To map the y attribute, select members of a dimension you would like to see on the vertical axis, in this case City.

  5. To map the x attribute, select the value (measure) corresponding to the horizontal axis, in this case Profit.

    The chart displays with axes mapped.

    Illustration

  6. To sort the chart by Profit, click the Sort icon next to the axis label:

    Illustration

  7. Assign colors to bars. In the Options popup (from Legend) find the field Color, click its link icon, and map it to the correct axis's measure.

    Illustration

  8. Apply the Positive/Negative color profile. In the Options popup (from Legend), click the measure name in the Color field. Select Options. In the Color profile field, select Positive/Negative.

    Illustration

The example is complete:

Illustration

Back to Legacy Chart Gallery

Appendix

The appendix contains code snippets for advanced users.

MDX:

SELECT
  NON EMPTY Order(
    [Geography].[City].[City].Members,
    [Measures].[Profit],
    BASC
  ) ON ROWS,
  [Measures].[Profit] ON COLUMNS
  FROM [EquityDerivativesCube]

JSON:

{
  "configuration": {
    "elementStylers": ["selection-highlight"],
    "type": "combo-horizontal-histogram",
    "mapping": {
      "y": {
        "from": ["[Geography].[City].[City]"]
      },
      "x": {
        "from": "[Measures].[Profit]"
      },
      "color": {
        "from": "[Measures].[Profit]",
        "profile": "positive-or-negative"
      }
    }
  }
}
  • Example
  • Summary of settings
  • Step-by-step instruction
  • Appendix
Copyright © 2020 ActiveViam