MSO Chart Settings
  • 18 Sep 2024
  • 3 Minutes to read
  • Dark
    Light

MSO Chart Settings

  • Dark
    Light

Article summary

General

MSO chart settings are used to define settings to apply to a Microsoft Office Chart during the creation of a report document.

Properties

Every collection of MSO chart settings has the following properties:

Name

Description
Chart TitleAn optional Expression that returns a string that contains the title of the chart.
Primary Axis Min. ValueAn optional Expression that returns the minimum value of the primary axis of the chart.
Primary Axis Max. ValueAn optional Expression that returns the maximum value of the primary axis of the chart.
Primary Axis Line ColorAn optional Expression that a single color or a single string that contains the CSS representation of a color that will be used for the line of the primary axis.
Secondary Axis Min. ValueAn optional Expression that returns the minimum value of the secondary axis of the chart.
Secondary Axis Max. ValueAn optional Expression that returns the maximum value of the secondary axis of the chart.
Secondary Axis Line ColorAn optional Expression that a single color or a single string that contains the CSS representation of a color that will be used for the line of the secondary axis.
Series Line Color(s)An optional Expression that returns one or more colors or strings that contain CSS representations of a color that will be used for the lines representing data series of the chart (see below).
Series Area Color(s)An optional Expression that returns one or more colors or strings that contain CSS representations of a color that will be used for the areas representing data series of the chart (see below).
Transform Second Column To SeriesWhen enabled, the second column of the exported table will be converted into individual columns (see below).

Series Colors

By setting the properties Series Line Color(s) and Series Area Color(s) you can define which colors are used to render the lines and areas of the MSO chart. You can supply one or more colors by either specifying a color object using the RGB Function or CSS values.

The following expression returns a single color which will be used for the first series of the MSO chart using the RGB function:

Single Color Using RGB Function

RGB(255, 0, 0)

The following example returns a single color from a CSS value:

Single Color Using CSS Value

"#FF0000"

The following example returns a list of three colors using the CreateList Function; the first one being used for the first series, the second for the second series, and the third for the third series of the MSO chart. Again, the RGB Function is used.

List of Colors Using RGB Function

CreateList(RGB(255, 0, 0), RGB(0, 255, 0), RGB(0, 0, 255))

You can also mix the RGB Function with CSS values:

List of Colors Using RGB Function and CSS Value

CreateList("#FF0000", RGB(0, 255, 0), "#0000FF")

Transforming Second Column To Series

The reason why this setting exists lies in the different structure of tables with multiple dimensions when exported from e.g. Qlik Sense Datasources and the table format that the MSO chart requires. It only applies to tables with more than one dimension.

Example

Let's suppose you have a line chart with two dimensions Year and Country and one measure Sales in a Qlik Sense Datasources that looks like this:


Line Chart with 2 Dimensions and 1 Measure in Qlik Sense

You then want to use the data behind that line chart to feed an MSO chart. By default, Mail & Deploy will export the following table into the data of the MSO chart:


Default Table Format for 2 Dimensions and 1 Measure

This, however, will not bring the expected results in the MSO chart:


MSO Chart with Default Table

You would expect to have one line per Country, but the MSO chart doesn't do that. If you enable the Transform Second Column To Series property in the MSO chart settings, Mail & Deploy will export the following table:


Transformed Table Format for 2 Dimensions and 1 Measure

As you can see, Mail & Deploy took all the values of the second dimension (*Country*) and created individual columns for each value of that dimension. This is what is expected by the MSO chart and with the transformed data you will get the expected output with one line per country:


MSO Chart with Transformed Table


Was this article helpful?