It is currently not possible to access or save information on which columns are being used to pivot, and cannot access it through the API(s) (currently using capabilities API).
- Information on which dimension or measure is used to pivot should be saved in the chart properties
- This information should also be made available via the capabilities APIs to enable both getting and setting the properties