Hello SAP Community!
We are having fun building a custom data source using the new Data Source SDK in Design Studio 1.4. We have the vast majority of things working. Great.
However, we are having an issue with charts and the Data Selection property (or setDataSelection() method). While the Simple Crosstab shows the sub-set of data we would expect with the Data Selection property correctly set, a chart with the same selection gives the error Cannot display data; check that the hierarchies are expanded to the same level.
This is how you can recreate this scenario:
- You need to have the Design Studio 1.4 SDK examples up and running.
- Create a new Design Studio application.
- Add a custom data source of type Static Data Source.
- Drag Simple Crosstab from the Custom Components on to your application canvas.
- Find the Data Source property on your new Simple Crosstab and select your Static Data Source in the drop down (most likely DS_1). You should see your Simple Crosstab display a 4 by 5 table (Alpha, Bravo, Charlie, etc.)
- Find the Data Selection property on your Simple Crosstab, and set it to {"cols": "A"}. You should see your Simple Crosstab only display the first column Alpha. This shows the Data Selection property working as expected.
- Drag a Chart from the Analytics Components on to your application canvas.
- Find the Data Source property on your new Chart and select your Static Data Source in the drop down (most likely DS_1). You should see your Chart display a column chart with A, B and C along the x-axis.
- Find the Data Selection property on your Chart, and set it to {"cols": "A"}. You should see your Chart display the error Cannot display data; check that the hierarchies are expanded to the same level.
So the question is... how do we get the chart to work using Data Selection and custom data sources. Is it simply not supported? Is is a bug, is it something extra that needs to be implemented in the custom data source?
Many kind regards,
Mark Bain.