Regression Line
Example
Summary of settings
- Type of chart: Scatter
- Mapping of
y
attribute: Profit - Mapping of
x
attribute: Size - Cardinality: City
- Overlays: polynomial 2 order regression line
Step-by-step instruction
Add new Chart Widget
Select Scatter
If there are multiple cubes connected to your application, you must select the cube you want for the chart.
To map the
x
attribute, select a measure or a formula for the horizontal axisMap the
y
attribute in the same way as was done for thex
attribute.The chart displays with one point, the total for the measure selected on the
x
axis plotted against the total for the measure selected on they
axis.To select Members you would like to plot ( members of the dimension City for example) , click Options in the Legend area of the chart:
In the Options popup you can change various attributes, in this case map Cardinality to City:
Now, six points display on the scatter plot, because there are six members in the City dimension with Size and Profit linked to them:
Use filters to limit the scope of data in the view Filters
Now go back to Options (in the Legend) and switch to the Overlays tab to add a new overlay, in this case, a regression line:
On mouse-hover, you can see the estimated parameters:
The chart is complete:
Back to Legacy Chart Gallery
Appendix
The appendix contains code snippets for advanced users.
MDX:
SELECT
{
[Measures].[Profit],
[Measures].[Size]
} ON COLUMNS,
NON EMPTY [Geography].[City].[City].Members ON ROWS
FROM [EquityDerivativesCube]
JSON:
{
"configurations": [
{
"handlers": {
/* ... */
},
"type": "scatter",
"mapping": {
"x": {
"from": "[Measures].[Size]"
},
"y": {
"from": "[Measures].[Profit]"
},
"cardinality": {
"from": ["[Geography].[City].[City]"]
}
},
"overlays": [
{
"key": "regression",
"args": {
"type": "polynomial"
}
}
]
}
]
}